@kubb/agent 5.0.0-beta.4 → 5.0.0-beta.6
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/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +61 -38
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/node_modules/ajv/dist/2019.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/2019.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/2020.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/2020.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/ajv.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/ajv.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/index.d.ts +2 -1
- package/.output/server/node_modules/ajv/dist/compile/index.js +10 -3
- package/.output/server/node_modules/ajv/dist/compile/index.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/jtd/parse.js +1 -1
- package/.output/server/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/jtd/serialize.js +1 -1
- package/.output/server/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/names.d.ts +1 -0
- package/.output/server/node_modules/ajv/dist/compile/names.js +1 -0
- package/.output/server/node_modules/ajv/dist/compile/names.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/compile/validate/index.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/compile/validate/index.js +18 -4
- package/.output/server/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/core.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/core.js +15 -1
- package/.output/server/node_modules/ajv/dist/core.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/draft4.d.ts +19 -0
- package/.output/server/node_modules/ajv/dist/draft4.js +57 -0
- package/.output/server/node_modules/ajv/dist/draft4.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-draft-04.json +138 -0
- package/.output/server/node_modules/ajv/dist/types/index.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +2 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.js +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.js +2 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/code.d.ts +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/code.js +10 -3
- package/.output/server/node_modules/ajv/dist/vocabularies/code.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.js +12 -2
- package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.js +56 -21
- package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/draft4.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft4.js +29 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft4.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/metadata.js +10 -2
- package/.output/server/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/oasContext.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/oasContext.js +26 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/oasContext.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +22 -3
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumber.d.ts +12 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumber.js +43 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumber.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js +19 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.js +4 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/readOnly.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/readOnly.js +20 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/readOnly.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.js +8 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -1
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/writeOnly.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/writeOnly.js +20 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/writeOnly.js.map +1 -0
- package/.output/server/node_modules/ajv/lib/2019.ts +1 -0
- package/.output/server/node_modules/ajv/lib/2020.ts +1 -0
- package/.output/server/node_modules/ajv/lib/ajv.ts +1 -0
- package/.output/server/node_modules/ajv/lib/compile/index.ts +16 -3
- package/.output/server/node_modules/ajv/lib/compile/jtd/parse.ts +3 -1
- package/.output/server/node_modules/ajv/lib/compile/jtd/serialize.ts +3 -1
- package/.output/server/node_modules/ajv/lib/compile/names.ts +1 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/index.ts +21 -4
- package/.output/server/node_modules/ajv/lib/core.ts +20 -1
- package/.output/server/node_modules/ajv/lib/draft4.ts +79 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-draft-04.json +138 -0
- package/.output/server/node_modules/ajv/lib/types/index.ts +4 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +2 -1
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +1 -1
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/properties.ts +4 -1
- package/.output/server/node_modules/ajv/lib/vocabularies/code.ts +10 -3
- package/.output/server/node_modules/ajv/lib/vocabularies/core/ref.ts +21 -5
- package/.output/server/node_modules/ajv/lib/vocabularies/discriminator/index.ts +69 -19
- package/.output/server/node_modules/ajv/lib/vocabularies/draft4.ts +32 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/metadata.ts +10 -2
- package/.output/server/node_modules/ajv/lib/vocabularies/oasContext.ts +27 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +29 -7
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/draft04/limitNumber.ts +75 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/draft04/limitNumberExclusive.ts +26 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/index.ts +4 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/readOnly.ts +23 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/required.ts +7 -1
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/writeOnly.ts +22 -0
- package/.output/server/node_modules/ajv/package.json +9 -6
- package/.output/server/node_modules/jiti/LICENSE +21 -0
- package/.output/server/node_modules/jiti/README.md +258 -0
- package/.output/server/node_modules/jiti/dist/babel.cjs +257 -0
- package/.output/server/node_modules/jiti/dist/jiti.cjs +1 -0
- package/.output/server/node_modules/jiti/lib/jiti-cli.mjs +34 -0
- package/.output/server/node_modules/jiti/lib/jiti-hooks.mjs +124 -0
- package/.output/server/node_modules/jiti/lib/jiti-native.mjs +121 -0
- package/.output/server/node_modules/jiti/lib/jiti-register.d.mts +1 -0
- package/.output/server/node_modules/jiti/lib/jiti-register.mjs +4 -0
- package/.output/server/node_modules/jiti/lib/jiti-static.mjs +23 -0
- package/.output/server/node_modules/jiti/lib/jiti.cjs +30 -0
- package/.output/server/node_modules/jiti/lib/jiti.d.cts +8 -0
- package/.output/server/node_modules/jiti/lib/jiti.d.mts +8 -0
- package/.output/server/node_modules/jiti/lib/jiti.mjs +29 -0
- package/.output/server/node_modules/jiti/lib/types.d.ts +420 -0
- package/.output/server/node_modules/jiti/package.json +146 -0
- package/.output/server/package.json +2 -5
- package/README.md +2 -2
- package/package.json +9 -8
- package/.output/server/node_modules/@rolldown/binding-linux-x64-gnu/package.json +0 -40
- package/.output/server/node_modules/@rolldown/binding-linux-x64-gnu/rolldown-binding.linux-x64-gnu.node +0 -0
- package/.output/server/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +0 -256
- package/.output/server/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +0 -75
- package/.output/server/node_modules/@rolldown/pluginutils/dist/filter/index.js +0 -3
- package/.output/server/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +0 -70
- package/.output/server/node_modules/@rolldown/pluginutils/dist/index.js +0 -1
- package/.output/server/node_modules/@rolldown/pluginutils/dist/utils.js +0 -17
- package/.output/server/node_modules/@rolldown/pluginutils/package.json +0 -37
- package/.output/server/node_modules/rolldown/dist/index.mjs +0 -50
- package/.output/server/node_modules/rolldown/dist/parse-ast-index.mjs +0 -60
- package/.output/server/node_modules/rolldown/dist/shared/binding-BeU_1iEk.mjs +0 -582
- package/.output/server/node_modules/rolldown/dist/shared/bindingify-input-options-DbbBhzky.mjs +0 -2211
- package/.output/server/node_modules/rolldown/dist/shared/define-config-DJOr6Iwt.mjs +0 -6
- package/.output/server/node_modules/rolldown/dist/shared/error-DL-e8-oE.mjs +0 -85
- package/.output/server/node_modules/rolldown/dist/shared/logs-D80CXhvg.mjs +0 -180
- package/.output/server/node_modules/rolldown/dist/shared/misc-DJYbNKZX.mjs +0 -21
- package/.output/server/node_modules/rolldown/dist/shared/normalize-string-or-regex-CbQQ69gT.mjs +0 -66
- package/.output/server/node_modules/rolldown/dist/shared/parse-B_ZnWxLZ.mjs +0 -74
- package/.output/server/node_modules/rolldown/dist/shared/prompt-U5ajztzG.mjs +0 -847
- package/.output/server/node_modules/rolldown/dist/shared/rolldown-D3JZ9rMt.mjs +0 -40
- package/.output/server/node_modules/rolldown/dist/shared/rolldown-build-DSxL8qiP.mjs +0 -3325
- package/.output/server/node_modules/rolldown/dist/shared/watch-Bd8v9ewv.mjs +0 -374
- package/.output/server/node_modules/rolldown/package.json +0 -153
- package/.output/server/node_modules/unrun/dist/index.mjs +0 -2
- package/.output/server/node_modules/unrun/dist/src-GU5PtktT.mjs +0 -887
- package/.output/server/node_modules/unrun/package.json +0 -125
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
4
|
+
"description": "Core schema meta-schema",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"schemaArray": {
|
|
7
|
+
"type": "array",
|
|
8
|
+
"minItems": 1,
|
|
9
|
+
"items": {"$ref": "#"}
|
|
10
|
+
},
|
|
11
|
+
"positiveInteger": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"positiveIntegerDefault0": {
|
|
16
|
+
"allOf": [{"$ref": "#/definitions/positiveInteger"}, {"default": 0}]
|
|
17
|
+
},
|
|
18
|
+
"simpleTypes": {
|
|
19
|
+
"enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
|
|
20
|
+
},
|
|
21
|
+
"stringArray": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {"type": "string"},
|
|
24
|
+
"minItems": 1,
|
|
25
|
+
"uniqueItems": true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"id": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"format": "uri"
|
|
33
|
+
},
|
|
34
|
+
"$schema": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"format": "uri"
|
|
37
|
+
},
|
|
38
|
+
"title": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"description": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"default": {},
|
|
45
|
+
"multipleOf": {
|
|
46
|
+
"type": "number",
|
|
47
|
+
"minimum": 0,
|
|
48
|
+
"exclusiveMinimum": true
|
|
49
|
+
},
|
|
50
|
+
"maximum": {
|
|
51
|
+
"type": "number"
|
|
52
|
+
},
|
|
53
|
+
"exclusiveMaximum": {
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"default": false
|
|
56
|
+
},
|
|
57
|
+
"minimum": {
|
|
58
|
+
"type": "number"
|
|
59
|
+
},
|
|
60
|
+
"exclusiveMinimum": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"default": false
|
|
63
|
+
},
|
|
64
|
+
"maxLength": {"$ref": "#/definitions/positiveInteger"},
|
|
65
|
+
"minLength": {"$ref": "#/definitions/positiveIntegerDefault0"},
|
|
66
|
+
"pattern": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"format": "regex"
|
|
69
|
+
},
|
|
70
|
+
"additionalItems": {
|
|
71
|
+
"anyOf": [{"type": "boolean"}, {"$ref": "#"}],
|
|
72
|
+
"default": {}
|
|
73
|
+
},
|
|
74
|
+
"items": {
|
|
75
|
+
"anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}],
|
|
76
|
+
"default": {}
|
|
77
|
+
},
|
|
78
|
+
"maxItems": {"$ref": "#/definitions/positiveInteger"},
|
|
79
|
+
"minItems": {"$ref": "#/definitions/positiveIntegerDefault0"},
|
|
80
|
+
"uniqueItems": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"default": false
|
|
83
|
+
},
|
|
84
|
+
"maxProperties": {"$ref": "#/definitions/positiveInteger"},
|
|
85
|
+
"minProperties": {"$ref": "#/definitions/positiveIntegerDefault0"},
|
|
86
|
+
"required": {"$ref": "#/definitions/stringArray"},
|
|
87
|
+
"additionalProperties": {
|
|
88
|
+
"anyOf": [{"type": "boolean"}, {"$ref": "#"}],
|
|
89
|
+
"default": {}
|
|
90
|
+
},
|
|
91
|
+
"definitions": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": {"$ref": "#"},
|
|
94
|
+
"default": {}
|
|
95
|
+
},
|
|
96
|
+
"properties": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": {"$ref": "#"},
|
|
99
|
+
"default": {}
|
|
100
|
+
},
|
|
101
|
+
"patternProperties": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": {"$ref": "#"},
|
|
104
|
+
"default": {}
|
|
105
|
+
},
|
|
106
|
+
"dependencies": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": {
|
|
109
|
+
"anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/stringArray"}]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"enum": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"minItems": 1,
|
|
115
|
+
"uniqueItems": true
|
|
116
|
+
},
|
|
117
|
+
"type": {
|
|
118
|
+
"anyOf": [
|
|
119
|
+
{"$ref": "#/definitions/simpleTypes"},
|
|
120
|
+
{
|
|
121
|
+
"type": "array",
|
|
122
|
+
"items": {"$ref": "#/definitions/simpleTypes"},
|
|
123
|
+
"minItems": 1,
|
|
124
|
+
"uniqueItems": true
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"allOf": {"$ref": "#/definitions/schemaArray"},
|
|
129
|
+
"anyOf": {"$ref": "#/definitions/schemaArray"},
|
|
130
|
+
"oneOf": {"$ref": "#/definitions/schemaArray"},
|
|
131
|
+
"not": {"$ref": "#"}
|
|
132
|
+
},
|
|
133
|
+
"dependencies": {
|
|
134
|
+
"exclusiveMaximum": ["maximum"],
|
|
135
|
+
"exclusiveMinimum": ["minimum"]
|
|
136
|
+
},
|
|
137
|
+
"default": {}
|
|
138
|
+
}
|
|
@@ -30,7 +30,8 @@ const def: CodeKeywordDefinition & AddedKeywordDefinition = {
|
|
|
30
30
|
trackErrors: true,
|
|
31
31
|
error,
|
|
32
32
|
code(cxt) {
|
|
33
|
-
const {gen,
|
|
33
|
+
const {gen, parentSchema, data, errsCount, it} = cxt
|
|
34
|
+
const {schema = it.opts.defaultAdditionalProperties} = cxt
|
|
34
35
|
/* istanbul ignore if */
|
|
35
36
|
if (!errsCount) throw new Error("ajv implementation error")
|
|
36
37
|
const {allErrors, opts} = it
|
|
@@ -12,7 +12,7 @@ const def: CodeKeywordDefinition = {
|
|
|
12
12
|
const valid = gen.name("valid")
|
|
13
13
|
schema.forEach((sch: AnySchema, i: number) => {
|
|
14
14
|
if (alwaysValidSchema(it, sch)) return
|
|
15
|
-
const schCxt = cxt.subschema({keyword: "allOf", schemaProp: i}, valid)
|
|
15
|
+
const schCxt = cxt.subschema({keyword: "allOf", schemaProp: i}, valid, true)
|
|
16
16
|
cxt.ok(valid)
|
|
17
17
|
cxt.mergeEvaluated(schCxt)
|
|
18
18
|
})
|
|
@@ -10,7 +10,10 @@ const def: CodeKeywordDefinition = {
|
|
|
10
10
|
schemaType: "object",
|
|
11
11
|
code(cxt: KeywordCxt) {
|
|
12
12
|
const {gen, schema, parentSchema, data, it} = cxt
|
|
13
|
-
if (
|
|
13
|
+
if (
|
|
14
|
+
(it.opts.removeAdditional === "all" && parentSchema.additionalProperties === undefined) ||
|
|
15
|
+
it.opts.defaultAdditionalProperties === false
|
|
16
|
+
) {
|
|
14
17
|
apDef.code(new KeywordCxt(it, apDef, "additionalProperties"))
|
|
15
18
|
}
|
|
16
19
|
const allProps = allSchemaProperties(schema)
|
|
@@ -5,6 +5,7 @@ import {CodeGen, _, and, or, not, nil, strConcat, getProperty, Code, Name} from
|
|
|
5
5
|
import {alwaysValidSchema, Type} from "../compile/util"
|
|
6
6
|
import N from "../compile/names"
|
|
7
7
|
import {useFunc} from "../compile/util"
|
|
8
|
+
import {getSkipCondition} from "./oasContext"
|
|
8
9
|
export function checkReportMissingProp(cxt: KeywordCxt, prop: string): void {
|
|
9
10
|
const {gen, data, it} = cxt
|
|
10
11
|
gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {
|
|
@@ -14,13 +15,17 @@ export function checkReportMissingProp(cxt: KeywordCxt, prop: string): void {
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export function checkMissingProp(
|
|
17
|
-
{gen, data, it: {opts}}: KeywordCxt,
|
|
18
|
+
{gen, data, it: {opts}, parentSchema}: KeywordCxt,
|
|
18
19
|
properties: string[],
|
|
19
20
|
missing: Name
|
|
20
21
|
): Code {
|
|
21
22
|
return or(
|
|
22
23
|
...properties.map((prop) =>
|
|
23
|
-
and(
|
|
24
|
+
and(
|
|
25
|
+
not(getSkipCondition(parentSchema, prop) ?? _`false`),
|
|
26
|
+
noPropertyInData(gen, data, prop, opts.ownProperties),
|
|
27
|
+
_`${missing} = ${prop}`
|
|
28
|
+
)
|
|
24
29
|
)
|
|
25
30
|
)
|
|
26
31
|
}
|
|
@@ -84,6 +89,7 @@ export function callValidateCode(
|
|
|
84
89
|
[N.parentData, it.parentData],
|
|
85
90
|
[N.parentDataProperty, it.parentDataProperty],
|
|
86
91
|
[N.rootData, N.rootData],
|
|
92
|
+
[N.isAllOfVariant, it.isAllOfVariant ? 1 : 0],
|
|
87
93
|
]
|
|
88
94
|
if (it.opts.dynamicRef) valCxt.push([N.dynamicAnchors, N.dynamicAnchors])
|
|
89
95
|
const args = _`${dataAndSchema}, ${gen.object(...valCxt)}`
|
|
@@ -133,9 +139,10 @@ export function validateArray(cxt: KeywordCxt): Name {
|
|
|
133
139
|
}
|
|
134
140
|
|
|
135
141
|
export function validateUnion(cxt: KeywordCxt): void {
|
|
136
|
-
const {gen, schema, keyword, it} = cxt
|
|
142
|
+
const {gen, schema, keyword, parentSchema, it} = cxt
|
|
137
143
|
/* istanbul ignore if */
|
|
138
144
|
if (!Array.isArray(schema)) throw new Error("ajv implementation error")
|
|
145
|
+
if (it.opts.discriminator && parentSchema.discriminator) return
|
|
139
146
|
const alwaysValid = schema.some((sch: AnySchema) => alwaysValidSchema(it, sch))
|
|
140
147
|
if (alwaysValid && !it.opts.unevaluated) return
|
|
141
148
|
|
|
@@ -45,7 +45,8 @@ const def: CodeKeywordDefinition = {
|
|
|
45
45
|
topSchemaRef: schName,
|
|
46
46
|
errSchemaPath: $ref,
|
|
47
47
|
},
|
|
48
|
-
valid
|
|
48
|
+
valid,
|
|
49
|
+
it.isAllOfVariant // pass isAllOfVariant into inlined $ref
|
|
49
50
|
)
|
|
50
51
|
cxt.mergeEvaluated(schCxt)
|
|
51
52
|
cxt.ok(valid)
|
|
@@ -86,11 +87,26 @@ export function callRef(cxt: KeywordCxt, v: Code, sch?: SchemaEnv, $async?: bool
|
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
function callSyncRef(): void {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
()
|
|
92
|
-
() => addErrorsFrom(v)
|
|
90
|
+
const visitedNodes: Name = gen.name("visitedNodes")
|
|
91
|
+
gen.code(
|
|
92
|
+
_`const ${visitedNodes} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${v}) || new Set()`
|
|
93
93
|
)
|
|
94
|
+
gen.if(_`!${visitedNodes}.has(${cxt.data})`, () => {
|
|
95
|
+
gen.code(
|
|
96
|
+
_`if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${v}, ${visitedNodes})`
|
|
97
|
+
)
|
|
98
|
+
gen.code(_`const dataNode = ${cxt.data}`)
|
|
99
|
+
gen.code(
|
|
100
|
+
_`if (typeof dataNode === "object" && dataNode !== null) ${visitedNodes}.add(dataNode)`
|
|
101
|
+
)
|
|
102
|
+
const res = cxt.result(
|
|
103
|
+
callValidateCode(cxt, v, passCxt),
|
|
104
|
+
() => addEvaluatedFrom(v),
|
|
105
|
+
() => addErrorsFrom(v)
|
|
106
|
+
)
|
|
107
|
+
gen.code(_`${visitedNodes}.delete(dataNode)`)
|
|
108
|
+
return res
|
|
109
|
+
})
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
function addErrorsFrom(source: Code): void {
|
|
@@ -12,11 +12,28 @@ const error: KeywordErrorDefinition = {
|
|
|
12
12
|
message: ({params: {discrError, tagName}}) =>
|
|
13
13
|
discrError === DiscrError.Tag
|
|
14
14
|
? `tag "${tagName}" must be string`
|
|
15
|
-
: `value of tag "${tagName}" must be in oneOf`,
|
|
15
|
+
: `value of tag "${tagName}" must be in oneOf or anyOf`,
|
|
16
16
|
params: ({params: {discrError, tag, tagName}}) =>
|
|
17
17
|
_`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
function getDiscriminatorPropertyFromAllOf(
|
|
21
|
+
sch: AnySchemaObject,
|
|
22
|
+
tagName: string
|
|
23
|
+
): AnySchemaObject | undefined {
|
|
24
|
+
if (!sch.allOf || !Array.isArray(sch.allOf)) {
|
|
25
|
+
return undefined
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
for (const subschema of sch.allOf) {
|
|
29
|
+
if (subschema?.properties?.[tagName]) {
|
|
30
|
+
return subschema.properties[tagName] as AnySchemaObject
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return undefined
|
|
35
|
+
}
|
|
36
|
+
|
|
20
37
|
const def: CodeKeywordDefinition = {
|
|
21
38
|
keyword: "discriminator",
|
|
22
39
|
type: "object",
|
|
@@ -24,14 +41,16 @@ const def: CodeKeywordDefinition = {
|
|
|
24
41
|
error,
|
|
25
42
|
code(cxt: KeywordCxt) {
|
|
26
43
|
const {gen, data, schema, parentSchema, it} = cxt
|
|
27
|
-
|
|
44
|
+
|
|
45
|
+
const keyword = parentSchema.oneOf ? "oneOf" : parentSchema.anyOf ? "anyOf" : undefined
|
|
46
|
+
|
|
28
47
|
if (!it.opts.discriminator) {
|
|
29
48
|
throw new Error("discriminator: requires discriminator option")
|
|
30
49
|
}
|
|
31
50
|
const tagName = schema.propertyName
|
|
32
51
|
if (typeof tagName != "string") throw new Error("discriminator: requires propertyName")
|
|
33
|
-
if (
|
|
34
|
-
|
|
52
|
+
if (!keyword) throw new Error("discriminator: requires oneOf or anyOf composite keyword")
|
|
53
|
+
const parentSchemaVariants = parentSchema[keyword]
|
|
35
54
|
const valid = gen.let("valid", false)
|
|
36
55
|
const tag = gen.const("tag", _`${data}${getProperty(tagName)}`)
|
|
37
56
|
gen.if(
|
|
@@ -55,37 +74,68 @@ const def: CodeKeywordDefinition = {
|
|
|
55
74
|
|
|
56
75
|
function applyTagSchema(schemaProp?: number): Name {
|
|
57
76
|
const _valid = gen.name("valid")
|
|
58
|
-
const schCxt = cxt.subschema({keyword
|
|
77
|
+
const schCxt = cxt.subschema({keyword, schemaProp}, _valid)
|
|
59
78
|
cxt.mergeEvaluated(schCxt, Name)
|
|
60
79
|
return _valid
|
|
61
80
|
}
|
|
62
81
|
|
|
63
82
|
function getMapping(): {[T in string]?: number} {
|
|
64
|
-
const
|
|
83
|
+
const discriminatorMapping: {[T in string]?: number} = {}
|
|
65
84
|
const topRequired = hasRequired(parentSchema)
|
|
66
85
|
let tagRequired = true
|
|
67
|
-
for (let i = 0; i <
|
|
68
|
-
let sch =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
86
|
+
for (let i = 0; i < parentSchemaVariants.length; i++) {
|
|
87
|
+
let sch = parentSchemaVariants[i]
|
|
88
|
+
const schRef = sch?.$ref
|
|
89
|
+
|
|
90
|
+
if (schRef && schema.mapping) {
|
|
91
|
+
const {mapping} = schema
|
|
92
|
+
const matchedKeys = Object.keys(mapping).filter((key) => mapping[key] === sch.$ref)
|
|
93
|
+
|
|
94
|
+
if (matchedKeys.length) {
|
|
95
|
+
for (const key of matchedKeys) {
|
|
96
|
+
addMapping(key, i)
|
|
97
|
+
}
|
|
98
|
+
continue
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (schRef && !schemaHasRulesButRef(sch, it.self.RULES)) {
|
|
103
|
+
sch = resolveRef.call(it.self, it.schemaEnv.root, it.baseId, schRef)
|
|
72
104
|
if (sch instanceof SchemaEnv) sch = sch.schema
|
|
73
|
-
if (sch === undefined) throw new MissingRefError(it.opts.uriResolver, it.baseId,
|
|
105
|
+
if (sch === undefined) throw new MissingRefError(it.opts.uriResolver, it.baseId, schRef)
|
|
74
106
|
}
|
|
75
|
-
|
|
107
|
+
|
|
108
|
+
let propSch = sch?.properties?.[tagName]
|
|
109
|
+
if (!propSch && sch?.allOf) {
|
|
110
|
+
propSch = getDiscriminatorPropertyFromAllOf(sch, tagName)
|
|
111
|
+
}
|
|
112
|
+
|
|
76
113
|
if (typeof propSch != "object") {
|
|
77
114
|
throw new Error(
|
|
78
|
-
`discriminator:
|
|
115
|
+
`discriminator: ${keyword} subschemas (or referenced schemas) must have "properties/${tagName}" or match mapping`
|
|
79
116
|
)
|
|
80
117
|
}
|
|
81
118
|
tagRequired = tagRequired && (topRequired || hasRequired(sch))
|
|
82
119
|
addMappings(propSch, i)
|
|
83
120
|
}
|
|
84
121
|
if (!tagRequired) throw new Error(`discriminator: "${tagName}" must be required`)
|
|
85
|
-
return
|
|
122
|
+
return discriminatorMapping
|
|
123
|
+
|
|
124
|
+
function hasRequired(sch: AnySchemaObject): boolean {
|
|
125
|
+
if (Array.isArray(sch.required) && sch.required.includes(tagName)) {
|
|
126
|
+
return true
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (sch.allOf && Array.isArray(sch.allOf)) {
|
|
130
|
+
for (const subschema of sch.allOf) {
|
|
131
|
+
const subSch = subschema as AnySchemaObject
|
|
132
|
+
if (Array.isArray(subSch.required) && subSch.required.includes(tagName)) {
|
|
133
|
+
return true
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
86
137
|
|
|
87
|
-
|
|
88
|
-
return Array.isArray(required) && required.includes(tagName)
|
|
138
|
+
return false
|
|
89
139
|
}
|
|
90
140
|
|
|
91
141
|
function addMappings(sch: AnySchemaObject, i: number): void {
|
|
@@ -101,10 +151,10 @@ const def: CodeKeywordDefinition = {
|
|
|
101
151
|
}
|
|
102
152
|
|
|
103
153
|
function addMapping(tagValue: unknown, i: number): void {
|
|
104
|
-
if (typeof tagValue != "string" || tagValue in
|
|
154
|
+
if (typeof tagValue != "string" || tagValue in discriminatorMapping) {
|
|
105
155
|
throw new Error(`discriminator: "${tagName}" values must be unique strings`)
|
|
106
156
|
}
|
|
107
|
-
|
|
157
|
+
discriminatorMapping[tagValue] = i
|
|
108
158
|
}
|
|
109
159
|
}
|
|
110
160
|
},
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {Vocabulary} from "../types"
|
|
2
|
+
import refKeyword from "./core/ref"
|
|
3
|
+
import getApplicatorVocabulary from "./applicator"
|
|
4
|
+
import unevaluatedVocabulary from "./unevaluated"
|
|
5
|
+
import formatVocabulary from "./format"
|
|
6
|
+
import validationVocabulary from "./validation"
|
|
7
|
+
import limitNumber from "./validation/draft04/limitNumber"
|
|
8
|
+
import limitNumberExclusive from "./validation/draft04/limitNumberExclusive"
|
|
9
|
+
|
|
10
|
+
const metadataVocabulary: Vocabulary = ["title", "description", "default"]
|
|
11
|
+
|
|
12
|
+
const coreVocabulary: Vocabulary = [
|
|
13
|
+
"$schema",
|
|
14
|
+
"id",
|
|
15
|
+
"$defs",
|
|
16
|
+
{keyword: "$comment"},
|
|
17
|
+
"definitions",
|
|
18
|
+
refKeyword,
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const validation: Vocabulary = [...validationVocabulary.slice(1), limitNumber, limitNumberExclusive]
|
|
22
|
+
|
|
23
|
+
const draft4Vocabularies: Vocabulary[] = [
|
|
24
|
+
coreVocabulary,
|
|
25
|
+
validation,
|
|
26
|
+
getApplicatorVocabulary(),
|
|
27
|
+
formatVocabulary,
|
|
28
|
+
metadataVocabulary,
|
|
29
|
+
unevaluatedVocabulary,
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
export default draft4Vocabularies
|
|
@@ -5,8 +5,16 @@ export const metadataVocabulary: Vocabulary = [
|
|
|
5
5
|
"description",
|
|
6
6
|
"default",
|
|
7
7
|
"deprecated",
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* readOnly/writeOnly are handled as validation keywords when OAS context is provided.
|
|
10
|
+
* Keeping them here would register them as annotation-only metadata and would
|
|
11
|
+
* prevent the context-aware validation behavior.
|
|
12
|
+
*
|
|
13
|
+
* @see ./validation/readOnly.ts
|
|
14
|
+
* @see ./validation/writeOnly.ts
|
|
15
|
+
*/
|
|
16
|
+
// "readOnly",
|
|
17
|
+
// "writeOnly",
|
|
10
18
|
"examples",
|
|
11
19
|
]
|
|
12
20
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type {AnySchemaObject} from "../types"
|
|
2
|
+
|
|
3
|
+
import {_, or, type Code} from "../compile/codegen"
|
|
4
|
+
import N from "../compile/names"
|
|
5
|
+
|
|
6
|
+
export function getSkipCondition(schema: AnySchemaObject, prop: string): Code | undefined {
|
|
7
|
+
const propSchema = schema.properties?.[prop]
|
|
8
|
+
if (!propSchema) return undefined
|
|
9
|
+
|
|
10
|
+
const hasReadOnly = propSchema.readOnly === true
|
|
11
|
+
const hasWriteOnly = propSchema.writeOnly === true
|
|
12
|
+
|
|
13
|
+
if (!hasReadOnly && !hasWriteOnly) return undefined
|
|
14
|
+
|
|
15
|
+
const conditions: Code[] = []
|
|
16
|
+
const apiContext = _`typeof ${N.this} == "object" && ${N.this} && ${N.this}.apiContext`
|
|
17
|
+
|
|
18
|
+
if (hasReadOnly) {
|
|
19
|
+
conditions.push(_`${apiContext} === "request"`)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (hasWriteOnly) {
|
|
23
|
+
conditions.push(_`${apiContext} === "response"`)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return or(...conditions)
|
|
27
|
+
}
|
package/.output/server/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts
CHANGED
|
@@ -23,10 +23,12 @@ const def: CodeKeywordDefinition = {
|
|
|
23
23
|
keyword: "unevaluatedProperties",
|
|
24
24
|
type: "object",
|
|
25
25
|
schemaType: ["boolean", "object"],
|
|
26
|
+
allowUndefined: true,
|
|
26
27
|
trackErrors: true,
|
|
27
28
|
error,
|
|
28
29
|
code(cxt) {
|
|
29
|
-
const {gen, schema, data, errsCount, it} = cxt
|
|
30
|
+
const {gen, schema = cxt.it.opts.defaultUnevaluatedProperties, data, errsCount, it} = cxt
|
|
31
|
+
const isForced = cxt.schema === undefined && cxt.it.opts.defaultUnevaluatedProperties === false
|
|
30
32
|
/* istanbul ignore if */
|
|
31
33
|
if (!errsCount) throw new Error("ajv implementation error")
|
|
32
34
|
const {allErrors, props} = it
|
|
@@ -37,13 +39,33 @@ const def: CodeKeywordDefinition = {
|
|
|
37
39
|
)
|
|
38
40
|
)
|
|
39
41
|
} else if (props !== true) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
43
|
+
const staticCheck = () =>
|
|
44
|
+
gen.forIn("key", data, (key: Name) =>
|
|
45
|
+
props === undefined
|
|
46
|
+
? unevaluatedPropCode(key)
|
|
47
|
+
: gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
if (isForced && it.errorPath.emptyStr() && !it.compositeRule) {
|
|
51
|
+
// $refs are compiled into functions
|
|
52
|
+
// We need to check in runtime if function was called from allOf.
|
|
53
|
+
// We need to check only on the top level of the function:
|
|
54
|
+
// it is ensured with `it.errorPath.emptyStr()` check
|
|
55
|
+
gen.if(_`${N.isAllOfVariant} === 0`, staticCheck)
|
|
56
|
+
} else {
|
|
57
|
+
if (!it.compositeRule || cxt.schema !== undefined) {
|
|
58
|
+
staticCheck()
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (!isForced) {
|
|
64
|
+
// disable shot-circut for forced unevaluatedProperties=false
|
|
65
|
+
// we may run or not the check in runtime so we can't short-circuit in compile-time
|
|
66
|
+
it.props = true
|
|
45
67
|
}
|
|
46
|
-
|
|
68
|
+
|
|
47
69
|
cxt.ok(_`${errsCount} === ${N.errors}`)
|
|
48
70
|
|
|
49
71
|
function unevaluatedPropCode(key: Name): void {
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CodeKeywordDefinition,
|
|
3
|
+
ErrorObject,
|
|
4
|
+
KeywordErrorDefinition,
|
|
5
|
+
KeywordErrorCxt,
|
|
6
|
+
} from "../../../types"
|
|
7
|
+
import type {KeywordCxt} from "../../../compile/validate"
|
|
8
|
+
import {_, str, operators, Code} from "../../../compile/codegen"
|
|
9
|
+
|
|
10
|
+
const ops = operators
|
|
11
|
+
|
|
12
|
+
export type LimitKwd = "maximum" | "minimum"
|
|
13
|
+
|
|
14
|
+
export type ExclusiveLimitKwd = "exclusiveMaximum" | "exclusiveMinimum"
|
|
15
|
+
|
|
16
|
+
type Comparison = "<=" | ">=" | "<" | ">"
|
|
17
|
+
|
|
18
|
+
interface KwdOp {
|
|
19
|
+
okStr: Comparison
|
|
20
|
+
ok: Code
|
|
21
|
+
fail: Code
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface KwdDef {
|
|
25
|
+
exclusive: ExclusiveLimitKwd
|
|
26
|
+
ops: [KwdOp, KwdOp]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const KWDs: {[K in LimitKwd]: KwdDef} = {
|
|
30
|
+
maximum: {
|
|
31
|
+
exclusive: "exclusiveMaximum",
|
|
32
|
+
ops: [
|
|
33
|
+
{okStr: "<=", ok: ops.LTE, fail: ops.GT},
|
|
34
|
+
{okStr: "<", ok: ops.LT, fail: ops.GTE},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
minimum: {
|
|
38
|
+
exclusive: "exclusiveMinimum",
|
|
39
|
+
ops: [
|
|
40
|
+
{okStr: ">=", ok: ops.GTE, fail: ops.LT},
|
|
41
|
+
{okStr: ">", ok: ops.GT, fail: ops.LTE},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type LimitNumberError = ErrorObject<
|
|
47
|
+
LimitKwd,
|
|
48
|
+
{limit: number; comparison: Comparison},
|
|
49
|
+
number | {$data: string}
|
|
50
|
+
>
|
|
51
|
+
|
|
52
|
+
const error: KeywordErrorDefinition = {
|
|
53
|
+
message: (cxt) => str`must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`,
|
|
54
|
+
params: (cxt) => _`{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}`,
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const def: CodeKeywordDefinition = {
|
|
58
|
+
keyword: Object.keys(KWDs),
|
|
59
|
+
type: "number",
|
|
60
|
+
schemaType: "number",
|
|
61
|
+
$data: true,
|
|
62
|
+
error,
|
|
63
|
+
code(cxt: KeywordCxt) {
|
|
64
|
+
const {data, schemaCode} = cxt
|
|
65
|
+
cxt.fail$data(_`${data} ${kwdOp(cxt).fail} ${schemaCode} || isNaN(${data})`)
|
|
66
|
+
},
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function kwdOp(cxt: KeywordErrorCxt): KwdOp {
|
|
70
|
+
const keyword = cxt.keyword as LimitKwd
|
|
71
|
+
const opsIdx = cxt.parentSchema?.[KWDs[keyword].exclusive] ? 1 : 0
|
|
72
|
+
return KWDs[keyword].ops[opsIdx]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default def
|
package/.output/server/node_modules/ajv/lib/vocabularies/validation/draft04/limitNumberExclusive.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CodeKeywordDefinition,
|
|
3
|
+
// ErrorObject,
|
|
4
|
+
// KeywordErrorDefinition,
|
|
5
|
+
} from "../../../types"
|
|
6
|
+
import type {KeywordCxt} from "../../../compile/validate"
|
|
7
|
+
import {LimitKwd, ExclusiveLimitKwd} from "./limitNumber"
|
|
8
|
+
|
|
9
|
+
const KWDs: {[K in ExclusiveLimitKwd]: LimitKwd} = {
|
|
10
|
+
exclusiveMaximum: "maximum",
|
|
11
|
+
exclusiveMinimum: "minimum",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const def: CodeKeywordDefinition = {
|
|
15
|
+
keyword: Object.keys(KWDs),
|
|
16
|
+
type: "number",
|
|
17
|
+
schemaType: "boolean",
|
|
18
|
+
code({keyword, parentSchema}: KeywordCxt) {
|
|
19
|
+
const limitKwd = KWDs[keyword as ExclusiveLimitKwd]
|
|
20
|
+
if (parentSchema[limitKwd] === undefined) {
|
|
21
|
+
throw new Error(`${keyword} can only be used with ${limitKwd}`)
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default def
|
|
@@ -5,6 +5,8 @@ import limitLength from "./limitLength"
|
|
|
5
5
|
import pattern, {PatternError} from "./pattern"
|
|
6
6
|
import limitProperties from "./limitProperties"
|
|
7
7
|
import required, {RequiredError} from "./required"
|
|
8
|
+
import readOnlyKeyword from "./readOnly"
|
|
9
|
+
import writeOnlyKeyword from "./writeOnly"
|
|
8
10
|
import limitItems from "./limitItems"
|
|
9
11
|
import uniqueItems, {UniqueItemsError} from "./uniqueItems"
|
|
10
12
|
import constKeyword, {ConstError} from "./const"
|
|
@@ -20,6 +22,8 @@ const validation: Vocabulary = [
|
|
|
20
22
|
// object
|
|
21
23
|
limitProperties,
|
|
22
24
|
required,
|
|
25
|
+
readOnlyKeyword,
|
|
26
|
+
writeOnlyKeyword,
|
|
23
27
|
// array
|
|
24
28
|
limitItems,
|
|
25
29
|
uniqueItems,
|