Spaces:
Sleeping
Sleeping
File size: 402 Bytes
4cadbaf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
'use strict';
module.exports = {
metaSchemaRef: metaSchemaRef
};
var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
function metaSchemaRef(ajv) {
var defaultMeta = ajv._opts.defaultMeta;
if (typeof defaultMeta == 'string') return { $ref: defaultMeta };
if (ajv.getSchema(META_SCHEMA_ID)) return { $ref: META_SCHEMA_ID };
console.warn('meta schema not defined');
return {};
}
|