serverless-step-functions
serverless-step-functions copied to clipboard
JSON support
As of Serverless v1.15.0, serverless.json
is supported as well as serverless.(yml|yaml)
(see https://github.com/serverless/serverless/releases)
This excellent plugin doesn't yet support JSON.
So... While the filename is required to be serverless.yml
, the format itself can be JSON. YAML 1.2 is actually a superset of JSON, so any correctly implemented YAML parser should also be able to parse JSON. I checked, and the parser that Serverless uses (js-yaml) does parse correctly.
It also means you can do really fun stuff with this plugin, like inject a JSON state machine definition file into a YAML serverless.yml
.
It's true that the format itself can be JSON, but it's kindof a pain creating a file with the yml extension but JSON content. It mucks with the syntax highlight on many editors, and generally just feels dirty to have an extension that doesn't match the content.