aswi2020vldc-gitlab/templetes/node_modules/ajv-keywords/keywords/_util.js @ 3a515b92
1 |
'use strict'; |
---|---|
2 |
|
3 |
module.exports = { |
4 |
metaSchemaRef: metaSchemaRef |
5 |
};
|
6 |
|
7 |
var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; |
8 |
|
9 |
function metaSchemaRef(ajv) { |
10 |
var defaultMeta = ajv._opts.defaultMeta; |
11 |
if (typeof defaultMeta == 'string') return { $ref: defaultMeta }; |
12 |
if (ajv.getSchema(META_SCHEMA_ID)) return { $ref: META_SCHEMA_ID }; |
13 |
console.warn('meta schema not defined'); |
14 |
return {}; |
15 |
}
|