grunt-json-schema-validation

0.0.1 • Public • Published

grunt-json-schema-validation

Grunt wrapper for validating JSON Schema.

Getting Started

This plugin requires Grunt ~0.4.5

Install this plugin with:

npm install grunt-json-schema-validation --save-dev

Add this line to your project's grunt.js Gruntfile:

grunt.loadNpmTasks('grunt-json-schema-validation');

Usage

In your project's Gruntfile, add a section named json_schema_validation to the data object passed into grunt.initConfig().

grunt.initConfig({
  json_schema_validation: {
    options: {
      files: ['test/files/*.json'],
      schema: {
        main: 'test/schemas/person.json'
      }
    }
  }
});

Options

files

Type: Array

An array of json files to be validated.

schema.main

Type: String

The main schema against which the files will be validated.

schema.refs

Type: Array

The references that may exist inside of the main schema.

Readme

Keywords

Package Sidebar

Install

npm i grunt-json-schema-validation

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • janechu