mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
16 lines
402 B
JavaScript
16 lines
402 B
JavaScript
|
'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 {};
|
||
|
}
|