Aws-sdk-net: Intellisense for Serverless.Template Json File In Visual Studio (.Net Core)

Created on 24 Jan 2019  路  8Comments  路  Source: aws/aws-sdk-net

When I add a Globals tag in serverless.template json file in VisualStudio, Intellisense complains as an invalid key for this object.

{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
"Description": "Sample SAM Template",
"Globals": {
"Function": {
"Timeout": 30,
"Runtime": "dotnetcore2.1"
}
}
}

Expected Behavior

Intellisense was to accept this tag and content.

Current Behavior

Intellisense underline and colour the tag in red and shows a hint saying that tag is invalid.

Your Environment

  • AWSSDK.Core version used: AWSToolsAndSDKForNet_sdk-3.3.446.0_ps-3.3.428.0_tk-1.14.5.0
  • Operating System and version: Windows 10 Professional
  • Visual Studio version: Professional 2017 Version 15.9.5 VisualStudio.15.Release/15.9.5+28307.280
  • Targeted .NET platform: .Net Core 2.1.5
  • AWS Toolkit for Visual Studio 2017 1.14.5.0
Visual Studio Toolkit bug

All 8 comments

Thanks for pointing this out.

I will try to read the code and see if I can find a solution this weekend.

Looks like Globals section is not defined in CloudFormation template anatomy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html).
I tried to find a point in code to validate the file but I couldn't find a simple solution for that.

I鈥檝e asked the people who manage the toolkit to work on this. I don鈥檛 know when it will be done, but it is something that we are aware of now. Thanks

@matheusmaximo I'm working on updating the backing schema for the editor

Thanks @normj !

New schema has been published. You should see a difference the next time you restart VS.

It works perfectly! Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings