You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replace boolean form of exclusiveMaximum/Minimum with numeric form
replace Ajv v5 constant with const
Optional changes
replace enum with a single allowed value with const
replace empty schemas with true
replace schemas {"not":{}} with false
You can use "migrate" command of ajv-cli to make these changes to your schemas.
You can use "migrate" command of ajv-cli to make these changes to your schemas.
Either we can update docs to keep using Draft04 of JSON schema with following info :
If you need to continue using draft-04 schemas
var ajv = new Ajv({
meta: false, // optional, to prevent adding draft-06 meta-schema
extendRefs: true, // optional, current default is to 'fail', spec behaviour is to 'ignore'
unknownFormats: 'ignore', // optional, current default is true (fail)
// ...
});
var metaSchema = require('ajv/lib/refs/json-schema-draft-04.json');
ajv.addMetaSchema(metaSchema);
ajv._opts.defaultMeta = metaSchema.id;
// optional, using unversioned URI is out of spec, see https://github.com/json-schema-org/json-schema-spec/issues/216
ajv._refs['http://json-schema.org/schema'] = 'http://json-schema.org/draft-04/schema';
// Optionally you can also disable keywords defined in draft-06
ajv.removeKeyword('propertyNames');
ajv.removeKeyword('contains');
ajv.removeKeyword('const');
Or we can update jsonschemas using "migrate" command of ajv-cli ?
The text was updated successfully, but these errors were encountered:
sundeepnarang
changed the title
AJV Draft 06 Support
AJV JSON Schemas Draft 06 Support Update
Jul 24, 2017
AJV@5 or above cannot add XMLSchema.jsonschema
Requires migration as per AJV (https://github.com/epoberezkin/ajv/releases/tag/5.0.0)
Either we can update docs to keep using Draft04 of JSON schema with following info :
Or we can update jsonschemas using "migrate" command of ajv-cli ?
The text was updated successfully, but these errors were encountered: