source: trip-planner-front/node_modules/ajv/dist/2020.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.3 KB
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
4const core_1 = require("./core");
5const draft2020_1 = require("./vocabularies/draft2020");
6const discriminator_1 = require("./vocabularies/discriminator");
7const json_schema_2020_12_1 = require("./refs/json-schema-2020-12");
8const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
9class Ajv2020 extends core_1.default {
10 constructor(opts = {}) {
11 super({
12 ...opts,
13 dynamicRef: true,
14 next: true,
15 unevaluated: true,
16 });
17 }
18 _addVocabularies() {
19 super._addVocabularies();
20 draft2020_1.default.forEach((v) => this.addVocabulary(v));
21 if (this.opts.discriminator)
22 this.addKeyword(discriminator_1.default);
23 }
24 _addDefaultMetaSchema() {
25 super._addDefaultMetaSchema();
26 const { $data, meta } = this.opts;
27 if (!meta)
28 return;
29 json_schema_2020_12_1.default.call(this, $data);
30 this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
31 }
32 defaultMeta() {
33 return (this.opts.defaultMeta =
34 super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
35 }
36}
37module.exports = exports = Ajv2020;
38Object.defineProperty(exports, "__esModule", { value: true });
39exports.default = Ajv2020;
40var validate_1 = require("./compile/validate");
41Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
42var codegen_1 = require("./compile/codegen");
43Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
44Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
45Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
46Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
47Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
48Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
49//# sourceMappingURL=2020.js.map
Note: See TracBrowser for help on using the repository browser.