source: trip-planner-front/node_modules/ajv/dist/2019.js@ 6fe77af

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

initial commit

  • Property mode set to 100644
File size: 2.6 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 draft7_1 = require("./vocabularies/draft7");
6const dynamic_1 = require("./vocabularies/dynamic");
7const next_1 = require("./vocabularies/next");
8const unevaluated_1 = require("./vocabularies/unevaluated");
9const discriminator_1 = require("./vocabularies/discriminator");
10const json_schema_2019_09_1 = require("./refs/json-schema-2019-09");
11const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema";
12class Ajv2019 extends core_1.default {
13 constructor(opts = {}) {
14 super({
15 ...opts,
16 dynamicRef: true,
17 next: true,
18 unevaluated: true,
19 });
20 }
21 _addVocabularies() {
22 super._addVocabularies();
23 this.addVocabulary(dynamic_1.default);
24 draft7_1.default.forEach((v) => this.addVocabulary(v));
25 this.addVocabulary(next_1.default);
26 this.addVocabulary(unevaluated_1.default);
27 if (this.opts.discriminator)
28 this.addKeyword(discriminator_1.default);
29 }
30 _addDefaultMetaSchema() {
31 super._addDefaultMetaSchema();
32 const { $data, meta } = this.opts;
33 if (!meta)
34 return;
35 json_schema_2019_09_1.default.call(this, $data);
36 this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
37 }
38 defaultMeta() {
39 return (this.opts.defaultMeta =
40 super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
41 }
42}
43module.exports = exports = Ajv2019;
44Object.defineProperty(exports, "__esModule", { value: true });
45exports.default = Ajv2019;
46var validate_1 = require("./compile/validate");
47Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
48var codegen_1 = require("./compile/codegen");
49Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
50Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
51Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
52Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
53Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
54Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
55//# sourceMappingURL=2019.js.map
Note: See TracBrowser for help on using the repository browser.