sirenlint
A lint tool for validating Siren (http://sirenspec.org).
Usage
CLI
$ sirenlint <siren-file>
or
$ cat <siren-file> | sirenlint
Example
$ echo '{ "links": [ { "rel": ["edit"] } ] }' | sirenlint
{ "links": [ { "rel": ["edit"] } ] }
sirenlint: 2 problems were found
error: ["links",0], Link is missing `href` attribute
warning: ["links"], The main entity is missing a link with a `self` relation
Output
The sirenlint
command will output the original input followed by a summary of errors and/or warnings.
The summary includes a stringified JSON array defining the JSON path of the associated error or warning
and a readable description of the problem.
Library
var fs = ;var path = ;var validate = ; var FILENAME = path; var subject = fs; var results = ; results;
Install
npm install sirenlint -g
License
MIT