refactor: rename $data.js and $data.json without $, closes #526
parent
b6d927980b
commit
9abe4e78a9
|
@ -7,7 +7,7 @@ var compileSchema = require('./compile')
|
|||
, stableStringify = require('fast-json-stable-stringify')
|
||||
, formats = require('./compile/formats')
|
||||
, rules = require('./compile/rules')
|
||||
, $dataMetaSchema = require('./$data')
|
||||
, $dataMetaSchema = require('./data')
|
||||
, patternGroups = require('./patternGroups')
|
||||
, util = require('./compile/util');
|
||||
|
||||
|
@ -433,7 +433,7 @@ function addFormat(name, format) {
|
|||
function addDraft6MetaSchema(self) {
|
||||
var $dataSchema;
|
||||
if (self._opts.$data) {
|
||||
$dataSchema = require('./refs/$data.json');
|
||||
$dataSchema = require('./refs/data.json');
|
||||
self.addMetaSchema($dataSchema, $dataSchema.$id, true);
|
||||
}
|
||||
if (self._opts.meta === false) return;
|
||||
|
|
|
@ -38,7 +38,7 @@ module.exports = function (metaSchema, keywordsJsonPointers) {
|
|||
keywords[key] = {
|
||||
anyOf: [
|
||||
schema,
|
||||
{ $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
|
||||
{ $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' }
|
||||
]
|
||||
};
|
||||
}
|
|
@ -50,7 +50,7 @@ function addKeyword(keyword, definition) {
|
|||
metaSchema = {
|
||||
anyOf: [
|
||||
metaSchema,
|
||||
{ '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
|
||||
{ '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#",
|
||||
"$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#",
|
||||
"description": "Meta-schema for $data reference (JSON-schema extension proposal)",
|
||||
"type": "object",
|
||||
"required": [ "$data" ],
|
Loading…
Reference in New Issue