Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 513 Bytes

cloudformation-schema.md

File metadata and controls

14 lines (10 loc) · 513 Bytes

cloudformationSchema

Utilities for js-yaml library use with AWS cloudformation specific YAML types

YAML schema including AWS Cloudformation specific short-hand syntaxes (i.e. !Ref or !GetAtt). It can then be passed as option to js-yaml library load method:

const yaml = require('js-yaml');
const fs   = require('fs');
const cloudFormationSchema = require('@serverless/utils/cloudformation-schema');

yaml.load(fs.readFileSync('serverless.yml', { schema: cloudFormationSchema });