source: trip-planner-front/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts@ fa375fe

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

initial commit

  • Property mode set to 100644
File size: 899 bytes
Line 
1import type Ajv from "../../core"
2import type {AnySchemaObject} from "../../types"
3import * as metaSchema from "./schema.json"
4import * as applicator from "./meta/applicator.json"
5import * as content from "./meta/content.json"
6import * as core from "./meta/core.json"
7import * as format from "./meta/format.json"
8import * as metadata from "./meta/meta-data.json"
9import * as validation from "./meta/validation.json"
10
11const META_SUPPORT_DATA = ["/properties"]
12
13export default function addMetaSchema2019(this: Ajv, $data?: boolean): Ajv {
14 ;[
15 metaSchema,
16 applicator,
17 content,
18 core,
19 with$data(this, format),
20 metadata,
21 with$data(this, validation),
22 ].forEach((sch) => this.addMetaSchema(sch, undefined, false))
23 return this
24
25 function with$data(ajv: Ajv, sch: AnySchemaObject): AnySchemaObject {
26 return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch
27 }
28}
Note: See TracBrowser for help on using the repository browser.