Skip to content

y13i/cfn-schema

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

cfn-schema

JSON Schema for AWS CloudFormation templates.

demo1 demo2

Schema URL

https://cfn-schema.y13i.com/schema

You can add query parameters to explicitly specify region and resource spec version.

Query Parameter Name Default Value
region us-east-1
version latest

For example...

https://cfn-schema.y13i.com/schema?region=eu-west-1&version=20.0.0

Usage

With Visual Studio Code

Open Workspace Settings by pressing Ctrl + , or ⌘ + , and add JSON Schema setting like this.

{
  "json.schemas": [
    {
      "fileMatch": ["*.cfn.json"],
      "url": "https://cfn-schema.y13i.com/schema"
    }
  ]
}

Save your template file with the extension .cfn.json. That's it.

If you prefer YAML, use YAML Support by Red Hat extension and set like this.

{
  "yaml.schemas": {
    "https://cfn-schema.y13i.com/schema": "*.cfn.yaml"
  }
}

See also...

With other editors

Development

From Nov 2020, cfn-schema uses API Gateway and Lambda (deployed by AWS SAM) to convert resource spec to JSON Schema.

See base.json for the base schema. See build.js for building logic which merges AWS-providing Resource Specification to the base schema.

Related Documents

Build

npm run build

Test

npm test

About

JSON Schema for AWS CloudFormation templates.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published