Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

ajv #337

node v6.17.1
version: master
endpointsharetweet
const Ajv = require('ajv'); const ajv = new Ajv({useDefaults: true}); const schema ={ properties: { foo: { default: 'bar', $ref: '#/definitions/foo' // or, if you're a $ref purist: // allOf: [{$ref: '#/definitions/foo'}] } }, definitions: { foo: { type: 'string' } } }; let data = {}; ajv.validate(schema, data); console.log(data);
Loading…

no comments

    sign in to comment