grunt-json-validate

0.1.1 • Public • Published

grunt-json-validate

Grunt task to validate JSON files against schemas, using jsonschema

Usage

In your gruntfile:

jsonvalidate: {
    target: {
        options: { },
        files: [
            {
                options: { },
                schema: 'path/to/root.schema.json',
                refs: [
                    'path/to/referenced/**/*.schema.json'
                ],
                src: 'path/to/**/*.json'
            }
        ]
    }
}

Apply schema and all schemas in the refs paths to src JSON files. Options are passed to jsonschema validator. Each target can have its global options, and an options object specific to a files group (these are merged, local overriding global).

Package Sidebar

Install

npm i grunt-json-validate

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • yonishostak