0.1.1 • Published 8 years ago

grunt-json-validate v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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).