ajv #1558

node v10.24.1
version: master
endpointsharetweet
const Ajv = require("ajv") const hex = { // $id: 'hex', type: 'string', pattern: '^[A-Fa-f0-9]+#x27;, } const combined = { $id: '2xhex', type: 'object', properties: { bar: hex, foo: hex, } } // const ajv = new Ajv({allErrors: false, addUsedSchema: true}) // ajv.compile(combined) // console.log(ajv.getSchema('2xhex') !== undefined && ajv.getSchema('hex') !== undefined) // true const ajv2 = new Ajv({allErrors: false, addUsedSchema: false}) ajv2.compile(combined) console.log(ajv2.getSchema('2xhex') === undefined && ajv2.getSchema('hex') === undefined) // true
Loading…

no comments

    sign in to comment