You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_util.js 402B

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