aws-cloudformation / cloudformation-template-schema

Inline syntax validation, documentation links and autocompletion for your CloudFormation templates.
Apache License 2.0
141 stars 24 forks source link

Schema is not valid #67

Closed indianakernick closed 1 year ago

indianakernick commented 1 year ago

I followed the instructions for configuring VS Code to use the schema. VS Code is saying that the schema is not valid. The exact error message is below.

Schema 'all-spec.json' is not valid:
/definitions/FnOr/properties/description : must be object,boolean

Because of this, there is no auto-complete or linting. I am using the latest version of the redhat.vscode-yaml extension. Similarly, using !GetAtt results in an unresolved tag error but !Ref does not.

PatMyron commented 1 year ago

Recommend trying the pre-packaged CloudFormation VSCode extension that will configure up-to-date schemas for you if you haven't tried yet:

https://marketplace.visualstudio.com/items?itemName=kddejong.vscode-cfn-lint

indianakernick commented 1 year ago

Looking at where error message is pointing, it does seem that the schema is invalid. If you search for FnOr, you'll find that description is inside properties. Perhaps the README should be updated to say that the schema is deprecated and shouldn't be used?

I'd prefer to use the schema because it's easier for collaboration. You don't have to worry about installing the python package to use it. I can just update the workspace settings and everyone gets linting without having to think about it.

indianakernick commented 1 year ago

Ok never mind. Even if that problem is fixed, the schema seems to be missing quite a few properties.

PatMyron commented 1 year ago

looks fixed in the 2nd commit of https://github.com/aws-cloudformation/cloudformation-template-schema/pull/11, but that hosted 2.15.0 schema is even slightly older than that commit: https://github.com/aws-cloudformation/cloudformation-template-schema/issues/32