json-schema-suite

0.0.2 • Public • Published

json-schema-suite

JSON Schema components bundled for easy use.

Configures the Schema with validation and hyperlink plugins, and exposes the Agent, as well as Schema and Validator for further configuration.

Installation

component:

$ component install ericgj/json-schema-suite

npm: $ npm install json-schema-suite

Example

var suite = require('json-schema-suite')
  , Agent = suite.Agent
  , Validator = suite.Validator
  , listener = Validator.emitter()

listener.on('error', function(e){
  console.error(e);
})

var agent = new Agent()
agent.base(window.location.origin);

agent.get('http://my.site/api', function(err,corr){
  if (corr.validate()) {
    //...
  }
})

API

See json-schema-agent, json-schema-valid, json-schema-core for details.

Running tests

In browser

$ node test/server.js

And browse http://localhost:3000.

In node

$ node test/server.js &
$ npm test

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0

Package Sidebar

Install

npm i json-schema-suite

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • ericgj