You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I would like to name my SAM template sam.yaml instead of the default template.yaml,
but then syntax highlighting fails for the Globals section.
To reproduce
Create a trivial project with template.yaml as follows:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Generated by sam init
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 20
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
CodeUri: HelloWorldFunction
Handler: helloworld.App::handleRequest
Runtime: java11
MemorySize: 512
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
Variables:
PARAM1: VALUE
Events:
HelloWorld:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /hello
Method: get
It will look fine in the editor.
2. Rename it to sam.yaml.
Syntax highlighting now fires up on the Globals section:
Schema validation: Property 'Globals' is not allowed
Expected behavior
IDEA should continue to recognise it as a SAM template (from its initial lines).
(This would also cover the case of other files named template.yaml that are not SAM templates.)
Your Environment
IntelliJ IDEA 2020.3.2 (Ultimate Edition)
Build #IU-203.7148.57, built on January 26, 2021
Licensed to Andreas Nyberg
You have a perpetual fallback license for this version.
Subscription is active until January 2, 2022.
Runtime version: 11.0.9.1+11-b1145.77 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 8
Registry: debugger.watches.in.variables=false, scala.erase.compiler.process.jdk.once=false
Non-Bundled Plugins: Batch Scripts Support, main.kotlin.com.jimschubert.intellij.swaggercodegen, open-liberty.intellij, SpotProfiler, com.crownpartners.intellivault, com.thesamet.intellij.ScariformFormat, ru.artyushov, soapUI Plugin, org.jetbrains.plugins.hocon, Jetbrains TeamCity Plugin, org.jfrog.idea, com.intellij.plugin.adernov.powershell, com.dmarcotte.handlebars, aws.toolkit, org.jetbrains.kotlin, org.mapstruct.intellij, JProfiler, org.intellij.scala
The text was updated successfully, but these errors were encountered:
Syntax highlighting for SAM templates is actually done by Intellij itself:
(down in the bottom left corner). If there is an issue with the schema, they seem to come from SchemaStore.org. We are planning on improving the plugin support to improve this experiences (See issue #2183 for an example of things we want to improve), but we currently do not do anything with syntax highlighting or code completion.
hunterwerlla
added
guidance
General information and guidance, answers to FAQs, or recommended best practices/resources.
and removed
bug
We can reproduce the issue and confirmed it is a bug.
labels
Feb 18, 2021
Describe the bug
I would like to name my SAM template
sam.yaml
instead of the defaulttemplate.yaml
,but then syntax highlighting fails for the
Globals
section.To reproduce
template.yaml
as follows:It will look fine in the editor.
2. Rename it to
sam.yaml
.Syntax highlighting now fires up on the
Globals
section:Expected behavior
IDEA should continue to recognise it as a SAM template (from its initial lines).
(This would also cover the case of other files named
template.yaml
that are not SAM templates.)Your Environment
IntelliJ IDEA 2020.3.2 (Ultimate Edition)
Build #IU-203.7148.57, built on January 26, 2021
Licensed to Andreas Nyberg
You have a perpetual fallback license for this version.
Subscription is active until January 2, 2022.
Runtime version: 11.0.9.1+11-b1145.77 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 8
Registry: debugger.watches.in.variables=false, scala.erase.compiler.process.jdk.once=false
Non-Bundled Plugins: Batch Scripts Support, main.kotlin.com.jimschubert.intellij.swaggercodegen, open-liberty.intellij, SpotProfiler, com.crownpartners.intellivault, com.thesamet.intellij.ScariformFormat, ru.artyushov, soapUI Plugin, org.jetbrains.plugins.hocon, Jetbrains TeamCity Plugin, org.jfrog.idea, com.intellij.plugin.adernov.powershell, com.dmarcotte.handlebars, aws.toolkit, org.jetbrains.kotlin, org.mapstruct.intellij, JProfiler, org.intellij.scala
The text was updated successfully, but these errors were encountered: