threadheap / serverless-ide-vscode

Serverless IDE: Enhanced support for AWS SAM and CloudFormation in VS Code
https://serverless-ide.com/
195 stars 45 forks source link

False schema validation errors within Resources section in serverless.yml #172

Closed orshemtov closed 1 year ago

orshemtov commented 2 years ago

Note: what to raise a request for unknown/new or required field or resource, then raise a PR.

68 and #62

are good examples of updating a schema definition. It should not take longer that 15 minutes.

What to prioritizer bugfix or feature? Hit that ❤️support button on the top of the screen.

And don't forget to 🌟star the repo

report a bug

Im using VSCode and the Serverless IDE extension, and the JSON schema "Serverless Framework Configuration"

This is the schema: https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/reference.json

image

For some reason, almost all AWS resources show an error in schema validation when defined under resources.Resources section, like so:

image

For some odd reason, it expects every resource I put in to be of type AWS::AmazonMQ::Broker:

image

No validation errors, correct auto-completion for resources parameters

It confuses the user, saying there's an error when there's not, it causes static checkers and IDE to show up "red" in places that do not require attention

JSON schema - https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/reference.json

martindanielsson commented 1 year ago

I ran into the same issue and it went away when I uninstalled the YAML extension, not sure if there's a way to get these two to work at the same time 🤔

pavelvlasov commented 1 year ago

Should be resolve in the latest release