json-schema-library 11.1.0 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mocharc.js +1 -0
- package/CHANGELOG.md +6 -0
- package/README.md +21 -13
- package/bowtie/.editorconfig +21 -0
- package/bowtie/.prettierrc +6 -0
- package/bowtie/BOWTIE.md +54 -0
- package/bowtie/Dockerfile +6 -0
- package/bowtie/bowtie-api.ts +101 -0
- package/bowtie/bowtie.test.ts +76 -0
- package/bowtie/bowtie.ts +156 -0
- package/bowtie/package.json +11 -0
- package/bowtie/tsconfig.json +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -514
- package/dist/index.d.mts +6 -514
- package/dist/index.mjs +1 -1
- package/dist/jlib.js +2 -13
- package/dist/remotes/index.cjs +1 -0
- package/dist/remotes/index.d.cts +7 -0
- package/dist/remotes/index.d.mts +7 -0
- package/dist/remotes/index.mjs +1 -0
- package/dist/types-B2wwNWyo.d.cts +513 -0
- package/dist/types-BhTU1l2h.d.mts +513 -0
- package/index.ts +0 -3
- package/package.json +14 -8
- package/src/Draft.ts +1 -1
- package/src/Keyword.ts +2 -3
- package/src/SchemaNode.ts +9 -0
- package/src/compileSchema.ts +4 -1
- package/src/draft04/keywords/$ref.ts +22 -14
- package/src/draft04/keywords/exclusiveMaximum.ts +14 -0
- package/src/draft04/keywords/exclusiveMinimum.ts +14 -0
- package/src/draft04/validateSchema.test.ts +20 -0
- package/src/draft06/keywords/$ref.ts +15 -5
- package/src/draft2019-09/keywords/$ref.test.ts +3 -1
- package/src/draft2019-09/keywords/$ref.ts +40 -16
- package/src/draft2019-09/keywords/additionalItems.ts +33 -10
- package/src/draft2019-09/keywords/items.ts +32 -10
- package/src/draft2019-09/keywords/unevaluatedItems.ts +19 -6
- package/src/draft2019-09/methods/getData.ts +1 -1
- package/src/draft2019-09/validateSchema.test.ts +28 -0
- package/src/errors/errors.ts +4 -0
- package/src/formats/formats.ts +35 -28
- package/src/formats/hyperjump.d.ts +172 -0
- package/src/keywords/$ref.ts +47 -13
- package/src/keywords/properties.ts +1 -1
- package/src/keywords/propertyDependencies.ts +1 -1
- package/src/methods/getData.ts +1 -1
- package/src/validateNode.ts +4 -1
- package/tsconfig.json +11 -4
- package/tsconfig.test.json +9 -2
- package/tsdown.config.ts +1 -1
- package/Dockerfile +0 -6
- package/bowtie_jlib.js +0 -140
- package/remotes/draft04.json +0 -150
- package/remotes/draft06.json +0 -155
- package/remotes/draft07.json +0 -155
- package/remotes/draft2019-09.json +0 -42
- package/remotes/draft2019-09_meta_applicator.json +0 -53
- package/remotes/draft2019-09_meta_content.json +0 -14
- package/remotes/draft2019-09_meta_core.json +0 -54
- package/remotes/draft2019-09_meta_format.json +0 -11
- package/remotes/draft2019-09_meta_meta-data.json +0 -34
- package/remotes/draft2019-09_meta_validation.json +0 -95
- package/remotes/draft2020-12.json +0 -55
- package/remotes/draft2020-12_meta_applicator.json +0 -45
- package/remotes/draft2020-12_meta_content.json +0 -14
- package/remotes/draft2020-12_meta_core.json +0 -48
- package/remotes/draft2020-12_meta_format_annotation.json +0 -11
- package/remotes/draft2020-12_meta_format_assertion.json +0 -11
- package/remotes/draft2020-12_meta_meta_data.json +0 -34
- package/remotes/draft2020-12_meta_unevaluated.json +0 -12
- package/remotes/draft2020-12_meta_validation.json +0 -87
- package/remotes/index.ts +0 -48
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2019-09/meta/validation",
|
|
4
|
-
"$recursiveAnchor": true,
|
|
5
|
-
|
|
6
|
-
"title": "Validation vocabulary meta-schema",
|
|
7
|
-
"type": ["object", "boolean"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"multipleOf": {
|
|
10
|
-
"type": "number",
|
|
11
|
-
"exclusiveMinimum": 0
|
|
12
|
-
},
|
|
13
|
-
"maximum": {
|
|
14
|
-
"type": "number"
|
|
15
|
-
},
|
|
16
|
-
"exclusiveMaximum": {
|
|
17
|
-
"type": "number"
|
|
18
|
-
},
|
|
19
|
-
"minimum": {
|
|
20
|
-
"type": "number"
|
|
21
|
-
},
|
|
22
|
-
"exclusiveMinimum": {
|
|
23
|
-
"type": "number"
|
|
24
|
-
},
|
|
25
|
-
"maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
26
|
-
"minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
27
|
-
"pattern": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"format": "regex"
|
|
30
|
-
},
|
|
31
|
-
"maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
32
|
-
"minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
33
|
-
"uniqueItems": {
|
|
34
|
-
"type": "boolean",
|
|
35
|
-
"default": false
|
|
36
|
-
},
|
|
37
|
-
"maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
38
|
-
"minContains": {
|
|
39
|
-
"$ref": "#/$defs/nonNegativeInteger",
|
|
40
|
-
"default": 1
|
|
41
|
-
},
|
|
42
|
-
"maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
43
|
-
"minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
44
|
-
"required": { "$ref": "#/$defs/stringArray" },
|
|
45
|
-
"dependentRequired": {
|
|
46
|
-
"type": "object",
|
|
47
|
-
"additionalProperties": {
|
|
48
|
-
"$ref": "#/$defs/stringArray"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"const": true,
|
|
52
|
-
"enum": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"items": true
|
|
55
|
-
},
|
|
56
|
-
"type": {
|
|
57
|
-
"anyOf": [
|
|
58
|
-
{ "$ref": "#/$defs/simpleTypes" },
|
|
59
|
-
{
|
|
60
|
-
"type": "array",
|
|
61
|
-
"items": { "$ref": "#/$defs/simpleTypes" },
|
|
62
|
-
"minItems": 1,
|
|
63
|
-
"uniqueItems": true
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"$defs": {
|
|
69
|
-
"nonNegativeInteger": {
|
|
70
|
-
"type": "integer",
|
|
71
|
-
"minimum": 0
|
|
72
|
-
},
|
|
73
|
-
"nonNegativeIntegerDefault0": {
|
|
74
|
-
"$ref": "#/$defs/nonNegativeInteger",
|
|
75
|
-
"default": 0
|
|
76
|
-
},
|
|
77
|
-
"simpleTypes": {
|
|
78
|
-
"enum": [
|
|
79
|
-
"array",
|
|
80
|
-
"boolean",
|
|
81
|
-
"integer",
|
|
82
|
-
"null",
|
|
83
|
-
"number",
|
|
84
|
-
"object",
|
|
85
|
-
"string"
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
"stringArray": {
|
|
89
|
-
"type": "array",
|
|
90
|
-
"items": { "type": "string" },
|
|
91
|
-
"uniqueItems": true,
|
|
92
|
-
"default": []
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
-
"$vocabulary": {
|
|
5
|
-
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
6
|
-
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
7
|
-
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
8
|
-
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
9
|
-
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
10
|
-
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
11
|
-
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
12
|
-
},
|
|
13
|
-
"$dynamicAnchor": "meta",
|
|
14
|
-
|
|
15
|
-
"title": "Core and Validation specifications meta-schema",
|
|
16
|
-
"allOf": [
|
|
17
|
-
{ "$ref": "meta/core" },
|
|
18
|
-
{ "$ref": "meta/applicator" },
|
|
19
|
-
{ "$ref": "meta/unevaluated" },
|
|
20
|
-
{ "$ref": "meta/validation" },
|
|
21
|
-
{ "$ref": "meta/meta-data" },
|
|
22
|
-
{ "$ref": "meta/format-annotation" },
|
|
23
|
-
{ "$ref": "meta/content" }
|
|
24
|
-
],
|
|
25
|
-
"type": ["object", "boolean"],
|
|
26
|
-
"$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
|
|
27
|
-
"properties": {
|
|
28
|
-
"definitions": {
|
|
29
|
-
"$comment": "\"definitions\" has been replaced by \"$defs\".",
|
|
30
|
-
"type": "object",
|
|
31
|
-
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
32
|
-
"deprecated": true,
|
|
33
|
-
"default": {}
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
|
|
37
|
-
"type": "object",
|
|
38
|
-
"additionalProperties": {
|
|
39
|
-
"anyOf": [{ "$dynamicRef": "#meta" }, { "$ref": "meta/validation#/$defs/stringArray" }]
|
|
40
|
-
},
|
|
41
|
-
"deprecated": true,
|
|
42
|
-
"default": {}
|
|
43
|
-
},
|
|
44
|
-
"$recursiveAnchor": {
|
|
45
|
-
"$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
|
|
46
|
-
"$ref": "meta/core#/$defs/anchorString",
|
|
47
|
-
"deprecated": true
|
|
48
|
-
},
|
|
49
|
-
"$recursiveRef": {
|
|
50
|
-
"$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
|
|
51
|
-
"$ref": "meta/core#/$defs/uriReferenceString",
|
|
52
|
-
"deprecated": true
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/meta/applicator",
|
|
4
|
-
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
6
|
-
"title": "Applicator vocabulary meta-schema",
|
|
7
|
-
"type": ["object", "boolean"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"prefixItems": { "$ref": "#/$defs/schemaArray" },
|
|
10
|
-
"items": { "$dynamicRef": "#meta" },
|
|
11
|
-
"contains": { "$dynamicRef": "#meta" },
|
|
12
|
-
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
13
|
-
"properties": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
16
|
-
"default": {}
|
|
17
|
-
},
|
|
18
|
-
"patternProperties": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
21
|
-
"propertyNames": { "format": "regex" },
|
|
22
|
-
"default": {}
|
|
23
|
-
},
|
|
24
|
-
"dependentSchemas": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
27
|
-
"default": {}
|
|
28
|
-
},
|
|
29
|
-
"propertyNames": { "$dynamicRef": "#meta" },
|
|
30
|
-
"if": { "$dynamicRef": "#meta" },
|
|
31
|
-
"then": { "$dynamicRef": "#meta" },
|
|
32
|
-
"else": { "$dynamicRef": "#meta" },
|
|
33
|
-
"allOf": { "$ref": "#/$defs/schemaArray" },
|
|
34
|
-
"anyOf": { "$ref": "#/$defs/schemaArray" },
|
|
35
|
-
"oneOf": { "$ref": "#/$defs/schemaArray" },
|
|
36
|
-
"not": { "$dynamicRef": "#meta" }
|
|
37
|
-
},
|
|
38
|
-
"$defs": {
|
|
39
|
-
"schemaArray": {
|
|
40
|
-
"type": "array",
|
|
41
|
-
"minItems": 1,
|
|
42
|
-
"items": { "$dynamicRef": "#meta" }
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/meta/content",
|
|
4
|
-
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
6
|
-
"title": "Content vocabulary meta-schema",
|
|
7
|
-
|
|
8
|
-
"type": ["object", "boolean"],
|
|
9
|
-
"properties": {
|
|
10
|
-
"contentEncoding": { "type": "string" },
|
|
11
|
-
"contentMediaType": { "type": "string" },
|
|
12
|
-
"contentSchema": { "$dynamicRef": "#meta" }
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/meta/core",
|
|
4
|
-
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
6
|
-
"title": "Core vocabulary meta-schema",
|
|
7
|
-
"type": ["object", "boolean"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"$id": {
|
|
10
|
-
"$ref": "#/$defs/uriReferenceString",
|
|
11
|
-
"$comment": "Non-empty fragments not allowed.",
|
|
12
|
-
"pattern": "^[^#]*#?$"
|
|
13
|
-
},
|
|
14
|
-
"$schema": { "$ref": "#/$defs/uriString" },
|
|
15
|
-
"$ref": { "$ref": "#/$defs/uriReferenceString" },
|
|
16
|
-
"$anchor": { "$ref": "#/$defs/anchorString" },
|
|
17
|
-
"$dynamicRef": { "$ref": "#/$defs/uriReferenceString" },
|
|
18
|
-
"$dynamicAnchor": { "$ref": "#/$defs/anchorString" },
|
|
19
|
-
"$vocabulary": {
|
|
20
|
-
"type": "object",
|
|
21
|
-
"propertyNames": { "$ref": "#/$defs/uriString" },
|
|
22
|
-
"additionalProperties": {
|
|
23
|
-
"type": "boolean"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"$comment": {
|
|
27
|
-
"type": "string"
|
|
28
|
-
},
|
|
29
|
-
"$defs": {
|
|
30
|
-
"type": "object",
|
|
31
|
-
"additionalProperties": { "$dynamicRef": "#meta" }
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"$defs": {
|
|
35
|
-
"anchorString": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
|
|
38
|
-
},
|
|
39
|
-
"uriString": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"format": "uri"
|
|
42
|
-
},
|
|
43
|
-
"uriReferenceString": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"format": "uri-reference"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/meta/format-annotation",
|
|
4
|
-
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
6
|
-
"title": "Format vocabulary meta-schema for annotation results",
|
|
7
|
-
"type": ["object", "boolean"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"format": { "type": "string" }
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/meta/format-assertion",
|
|
4
|
-
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
6
|
-
"title": "Format vocabulary meta-schema for assertion results",
|
|
7
|
-
"type": ["object", "boolean"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"format": { "type": "string" }
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/meta/meta-data",
|
|
4
|
-
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
6
|
-
"title": "Meta-data vocabulary meta-schema",
|
|
7
|
-
|
|
8
|
-
"type": ["object", "boolean"],
|
|
9
|
-
"properties": {
|
|
10
|
-
"title": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
13
|
-
"description": {
|
|
14
|
-
"type": "string"
|
|
15
|
-
},
|
|
16
|
-
"default": true,
|
|
17
|
-
"deprecated": {
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"default": false
|
|
20
|
-
},
|
|
21
|
-
"readOnly": {
|
|
22
|
-
"type": "boolean",
|
|
23
|
-
"default": false
|
|
24
|
-
},
|
|
25
|
-
"writeOnly": {
|
|
26
|
-
"type": "boolean",
|
|
27
|
-
"default": false
|
|
28
|
-
},
|
|
29
|
-
"examples": {
|
|
30
|
-
"type": "array",
|
|
31
|
-
"items": true
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/meta/unevaluated",
|
|
4
|
-
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
6
|
-
"title": "Unevaluated applicator vocabulary meta-schema",
|
|
7
|
-
"type": ["object", "boolean"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"unevaluatedItems": { "$dynamicRef": "#meta" },
|
|
10
|
-
"unevaluatedProperties": { "$dynamicRef": "#meta" }
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://json-schema.org/draft/2020-12/meta/validation",
|
|
4
|
-
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
6
|
-
"title": "Validation vocabulary meta-schema",
|
|
7
|
-
"type": ["object", "boolean"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"type": {
|
|
10
|
-
"anyOf": [
|
|
11
|
-
{ "$ref": "#/$defs/simpleTypes" },
|
|
12
|
-
{
|
|
13
|
-
"type": "array",
|
|
14
|
-
"items": { "$ref": "#/$defs/simpleTypes" },
|
|
15
|
-
"minItems": 1,
|
|
16
|
-
"uniqueItems": true
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
"const": true,
|
|
21
|
-
"enum": {
|
|
22
|
-
"type": "array",
|
|
23
|
-
"items": true
|
|
24
|
-
},
|
|
25
|
-
"multipleOf": {
|
|
26
|
-
"type": "number",
|
|
27
|
-
"exclusiveMinimum": 0
|
|
28
|
-
},
|
|
29
|
-
"maximum": {
|
|
30
|
-
"type": "number"
|
|
31
|
-
},
|
|
32
|
-
"exclusiveMaximum": {
|
|
33
|
-
"type": "number"
|
|
34
|
-
},
|
|
35
|
-
"minimum": {
|
|
36
|
-
"type": "number"
|
|
37
|
-
},
|
|
38
|
-
"exclusiveMinimum": {
|
|
39
|
-
"type": "number"
|
|
40
|
-
},
|
|
41
|
-
"maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
42
|
-
"minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
43
|
-
"pattern": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"format": "regex"
|
|
46
|
-
},
|
|
47
|
-
"maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
48
|
-
"minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
49
|
-
"uniqueItems": {
|
|
50
|
-
"type": "boolean",
|
|
51
|
-
"default": false
|
|
52
|
-
},
|
|
53
|
-
"maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
54
|
-
"minContains": {
|
|
55
|
-
"$ref": "#/$defs/nonNegativeInteger",
|
|
56
|
-
"default": 1
|
|
57
|
-
},
|
|
58
|
-
"maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
59
|
-
"minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
60
|
-
"required": { "$ref": "#/$defs/stringArray" },
|
|
61
|
-
"dependentRequired": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"additionalProperties": {
|
|
64
|
-
"$ref": "#/$defs/stringArray"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"$defs": {
|
|
69
|
-
"nonNegativeInteger": {
|
|
70
|
-
"type": "integer",
|
|
71
|
-
"minimum": 0
|
|
72
|
-
},
|
|
73
|
-
"nonNegativeIntegerDefault0": {
|
|
74
|
-
"$ref": "#/$defs/nonNegativeInteger",
|
|
75
|
-
"default": 0
|
|
76
|
-
},
|
|
77
|
-
"simpleTypes": {
|
|
78
|
-
"enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
|
|
79
|
-
},
|
|
80
|
-
"stringArray": {
|
|
81
|
-
"type": "array",
|
|
82
|
-
"items": { "type": "string" },
|
|
83
|
-
"uniqueItems": true,
|
|
84
|
-
"default": []
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
package/remotes/index.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import draft04Meta from "./draft04.json";
|
|
2
|
-
import draft06Meta from "./draft06.json";
|
|
3
|
-
import draft07Meta from "./draft07.json";
|
|
4
|
-
import draft2019Meta from "./draft2019-09.json";
|
|
5
|
-
import draft2019MetaApplicator from "./draft2019-09_meta_applicator.json";
|
|
6
|
-
import draft2019MetaContent from "./draft2019-09_meta_content.json";
|
|
7
|
-
import draft2019MetaCore from "./draft2019-09_meta_core.json";
|
|
8
|
-
import draft2019MetaFormat from "./draft2019-09_meta_format.json";
|
|
9
|
-
import draft2019MetaMetaData from "./draft2019-09_meta_meta-data.json";
|
|
10
|
-
import draft2019MetaValidation from "./draft2019-09_meta_validation.json";
|
|
11
|
-
import draft2020Meta from "./draft2020-12.json";
|
|
12
|
-
import draft2020MetaApplicator from "./draft2020-12_meta_applicator.json";
|
|
13
|
-
import draft2020MetaContent from "./draft2020-12_meta_content.json";
|
|
14
|
-
import draft2020MetaCore from "./draft2020-12_meta_core.json";
|
|
15
|
-
import draft2020MetaFormatAnnotation from "./draft2020-12_meta_format_annotation.json";
|
|
16
|
-
import draft2020MetaFormatAssertion from "./draft2020-12_meta_format_assertion.json";
|
|
17
|
-
import draft2020MetaMetaData from "./draft2020-12_meta_meta_data.json";
|
|
18
|
-
import draft2020MetaUnevaluated from "./draft2020-12_meta_unevaluated.json";
|
|
19
|
-
import draft2020MetaValidation from "./draft2020-12_meta_validation.json";
|
|
20
|
-
|
|
21
|
-
/** remote meta-schema stored by schema $id */
|
|
22
|
-
const remotes: Record<string, any> = {};
|
|
23
|
-
|
|
24
|
-
(
|
|
25
|
-
[
|
|
26
|
-
draft04Meta,
|
|
27
|
-
draft06Meta,
|
|
28
|
-
draft07Meta,
|
|
29
|
-
draft2019Meta,
|
|
30
|
-
draft2019MetaApplicator,
|
|
31
|
-
draft2019MetaContent,
|
|
32
|
-
draft2019MetaCore,
|
|
33
|
-
draft2019MetaFormat,
|
|
34
|
-
draft2019MetaMetaData,
|
|
35
|
-
draft2019MetaValidation,
|
|
36
|
-
draft2020Meta,
|
|
37
|
-
draft2020MetaApplicator,
|
|
38
|
-
draft2020MetaContent,
|
|
39
|
-
draft2020MetaCore,
|
|
40
|
-
draft2020MetaFormatAnnotation,
|
|
41
|
-
draft2020MetaFormatAssertion,
|
|
42
|
-
draft2020MetaMetaData,
|
|
43
|
-
draft2020MetaUnevaluated,
|
|
44
|
-
draft2020MetaValidation
|
|
45
|
-
] as { id?: string; $id?: string }[]
|
|
46
|
-
).forEach((schema, index) => (remotes[schema.$id ?? schema.id ?? index] = schema));
|
|
47
|
-
|
|
48
|
-
export { remotes };
|