@hyperjump/json-schema 1.15.1 → 1.16.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/lib/openapi.js +17 -0
- package/openapi-3-1/dialect/base.js +2 -1
- package/openapi-3-1/index.d.ts +1 -1
- package/openapi-3-1/index.js +2 -2
- package/openapi-3-1/meta/base.js +3 -2
- package/openapi-3-1/schema-base.js +1 -1
- package/openapi-3-1/schema.js +94 -127
- package/openapi-3-2/dialect/base.js +22 -0
- package/openapi-3-2/index.d.ts +91 -0
- package/openapi-3-2/index.js +49 -0
- package/openapi-3-2/meta/base.js +77 -0
- package/openapi-3-2/schema-base.js +33 -0
- package/openapi-3-2/schema-draft-04.js +33 -0
- package/openapi-3-2/schema-draft-06.js +33 -0
- package/openapi-3-2/schema-draft-07.js +33 -0
- package/openapi-3-2/schema-draft-2019-09.js +33 -0
- package/openapi-3-2/schema-draft-2020-12.js +33 -0
- package/openapi-3-2/schema.js +5 -0
- package/package.json +1 -1
package/lib/openapi.js
CHANGED
|
@@ -3,6 +3,7 @@ import { addMediaTypePlugin } from "@hyperjump/browser";
|
|
|
3
3
|
import { buildSchemaDocument } from "./schema.js";
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
const is32 = RegExp.prototype.test.bind(/^3\.2\.\d+(-.+)?$/);
|
|
6
7
|
const is31 = RegExp.prototype.test.bind(/^3\.1\.\d+(-.+)?$/);
|
|
7
8
|
const is30 = RegExp.prototype.test.bind(/^3\.0\.\d+(-.+)?$/);
|
|
8
9
|
|
|
@@ -34,6 +35,22 @@ addMediaTypePlugin("application/openapi+json", {
|
|
|
34
35
|
} else {
|
|
35
36
|
defaultDialect = `https://spec.openapis.org/oas/3.1/schema?${encodeURIComponent(doc.jsonSchemaDialect)}`;
|
|
36
37
|
}
|
|
38
|
+
} else if (is32(version)) {
|
|
39
|
+
if (!("jsonSchemaDialect" in doc) || doc.jsonSchemaDialect === "https://spec.openapis.org/oas/3.2/dialect/base") {
|
|
40
|
+
defaultDialect = "https://spec.openapis.org/oas/3.2/schema-base";
|
|
41
|
+
} else if (doc.jsonSchemaDialect === "https://json-schema.org/draft/2020-12/schema") {
|
|
42
|
+
defaultDialect = `https://spec.openapis.org/oas/3.2/schema-draft-2020-12`;
|
|
43
|
+
} else if (doc.jsonSchemaDialect === "https://json-schema.org/draft/2019-09/schema") {
|
|
44
|
+
defaultDialect = `https://spec.openapis.org/oas/3.2/schema-draft-2019-09`;
|
|
45
|
+
} else if (doc.jsonSchemaDialect === "http://json-schema.org/draft-07/schema#") {
|
|
46
|
+
defaultDialect = `https://spec.openapis.org/oas/3.2/schema-draft-07`;
|
|
47
|
+
} else if (doc.jsonSchemaDialect === "http://json-schema.org/draft-06/schema#") {
|
|
48
|
+
defaultDialect = `https://spec.openapis.org/oas/3.2/schema-draft-06`;
|
|
49
|
+
} else if (doc.jsonSchemaDialect === "http://json-schema.org/draft-04/schema#") {
|
|
50
|
+
defaultDialect = `https://spec.openapis.org/oas/3.2/schema-draft-04`;
|
|
51
|
+
} else {
|
|
52
|
+
defaultDialect = `https://spec.openapis.org/oas/3.2/schema?${encodeURIComponent(doc.jsonSchemaDialect)}`;
|
|
53
|
+
}
|
|
37
54
|
} else {
|
|
38
55
|
throw Error(`Encountered unsupported OpenAPI version '${version}' in ${response.url}`);
|
|
39
56
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
"$id": "https://spec.openapis.org/oas/3.1/dialect/base",
|
|
3
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
3
|
"$vocabulary": {
|
|
5
4
|
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
@@ -14,6 +13,8 @@ export default {
|
|
|
14
13
|
"$dynamicAnchor": "meta",
|
|
15
14
|
|
|
16
15
|
"title": "OpenAPI 3.1 Schema Object Dialect",
|
|
16
|
+
"description": "A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions",
|
|
17
|
+
|
|
17
18
|
"allOf": [
|
|
18
19
|
{ "$ref": "https://json-schema.org/draft/2020-12/schema" },
|
|
19
20
|
{ "$ref": "https://spec.openapis.org/oas/3.1/meta/base" }
|
package/openapi-3-1/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { JsonSchemaType } from "../lib/common.js";
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export type OasSchema31 = boolean | {
|
|
6
|
-
$schema?: "https://
|
|
6
|
+
$schema?: "https://spec.openapis.org/oas/3.1/dialect/base";
|
|
7
7
|
$id?: string;
|
|
8
8
|
$anchor?: string;
|
|
9
9
|
$ref?: string;
|
package/openapi-3-1/index.js
CHANGED
|
@@ -32,8 +32,8 @@ defineVocabulary("https://spec.openapis.org/oas/3.1/vocab/base", {
|
|
|
32
32
|
"xml": "https://spec.openapis.org/oas/3.0/keyword/xml"
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
registerSchema(vocabularySchema);
|
|
36
|
-
registerSchema(dialectSchema);
|
|
35
|
+
registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.1/meta/base");
|
|
36
|
+
registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.1/dialect/base");
|
|
37
37
|
|
|
38
38
|
// Current Schemas
|
|
39
39
|
registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema");
|
package/openapi-3-1/meta/base.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
"$id": "https://spec.openapis.org/oas/3.1/meta/base",
|
|
3
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
3
|
"$dynamicAnchor": "meta",
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
"title": "OAS Base Vocabulary",
|
|
6
|
+
"description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect",
|
|
6
7
|
|
|
7
8
|
"type": ["object", "boolean"],
|
|
8
9
|
"properties": {
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
"https://spec.openapis.org/oas/3.1/vocab/base": false
|
|
13
13
|
},
|
|
14
14
|
|
|
15
|
-
"description": "The description of OpenAPI v3.1.x
|
|
15
|
+
"description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect",
|
|
16
16
|
|
|
17
17
|
"$ref": "https://spec.openapis.org/oas/3.1/schema",
|
|
18
18
|
"properties": {
|
package/openapi-3-1/schema.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
"$id": "https://spec.openapis.org/oas/3.1/schema/2022-10-07",
|
|
3
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
-
"description": "The description of OpenAPI v3.1.x
|
|
3
|
+
"description": "The description of OpenAPI v3.1.x Documents without Schema Object validation",
|
|
5
4
|
"type": "object",
|
|
6
5
|
"properties": {
|
|
7
6
|
"openapi": {
|
|
@@ -13,7 +12,7 @@ export default {
|
|
|
13
12
|
},
|
|
14
13
|
"jsonSchemaDialect": {
|
|
15
14
|
"type": "string",
|
|
16
|
-
"format": "uri",
|
|
15
|
+
"format": "uri-reference",
|
|
17
16
|
"default": "https://spec.openapis.org/oas/3.1/dialect/base"
|
|
18
17
|
},
|
|
19
18
|
"servers": {
|
|
@@ -33,7 +32,7 @@ export default {
|
|
|
33
32
|
"webhooks": {
|
|
34
33
|
"type": "object",
|
|
35
34
|
"additionalProperties": {
|
|
36
|
-
"$ref": "#/$defs/path-item
|
|
35
|
+
"$ref": "#/$defs/path-item"
|
|
37
36
|
}
|
|
38
37
|
},
|
|
39
38
|
"components": {
|
|
@@ -80,7 +79,7 @@ export default {
|
|
|
80
79
|
"unevaluatedProperties": false,
|
|
81
80
|
"$defs": {
|
|
82
81
|
"info": {
|
|
83
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
82
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#info-object",
|
|
84
83
|
"type": "object",
|
|
85
84
|
"properties": {
|
|
86
85
|
"title": {
|
|
@@ -94,7 +93,7 @@ export default {
|
|
|
94
93
|
},
|
|
95
94
|
"termsOfService": {
|
|
96
95
|
"type": "string",
|
|
97
|
-
"format": "uri"
|
|
96
|
+
"format": "uri-reference"
|
|
98
97
|
},
|
|
99
98
|
"contact": {
|
|
100
99
|
"$ref": "#/$defs/contact"
|
|
@@ -114,7 +113,7 @@ export default {
|
|
|
114
113
|
"unevaluatedProperties": false
|
|
115
114
|
},
|
|
116
115
|
"contact": {
|
|
117
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
116
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#contact-object",
|
|
118
117
|
"type": "object",
|
|
119
118
|
"properties": {
|
|
120
119
|
"name": {
|
|
@@ -122,7 +121,7 @@ export default {
|
|
|
122
121
|
},
|
|
123
122
|
"url": {
|
|
124
123
|
"type": "string",
|
|
125
|
-
"format": "uri"
|
|
124
|
+
"format": "uri-reference"
|
|
126
125
|
},
|
|
127
126
|
"email": {
|
|
128
127
|
"type": "string",
|
|
@@ -133,7 +132,7 @@ export default {
|
|
|
133
132
|
"unevaluatedProperties": false
|
|
134
133
|
},
|
|
135
134
|
"license": {
|
|
136
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
135
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#license-object",
|
|
137
136
|
"type": "object",
|
|
138
137
|
"properties": {
|
|
139
138
|
"name": {
|
|
@@ -144,7 +143,7 @@ export default {
|
|
|
144
143
|
},
|
|
145
144
|
"url": {
|
|
146
145
|
"type": "string",
|
|
147
|
-
"format": "uri"
|
|
146
|
+
"format": "uri-reference"
|
|
148
147
|
}
|
|
149
148
|
},
|
|
150
149
|
"required": [
|
|
@@ -163,12 +162,11 @@ export default {
|
|
|
163
162
|
"unevaluatedProperties": false
|
|
164
163
|
},
|
|
165
164
|
"server": {
|
|
166
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
165
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#server-object",
|
|
167
166
|
"type": "object",
|
|
168
167
|
"properties": {
|
|
169
168
|
"url": {
|
|
170
|
-
"type": "string"
|
|
171
|
-
"format": "uri-reference"
|
|
169
|
+
"type": "string"
|
|
172
170
|
},
|
|
173
171
|
"description": {
|
|
174
172
|
"type": "string"
|
|
@@ -187,7 +185,7 @@ export default {
|
|
|
187
185
|
"unevaluatedProperties": false
|
|
188
186
|
},
|
|
189
187
|
"server-variable": {
|
|
190
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
188
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object",
|
|
191
189
|
"type": "object",
|
|
192
190
|
"properties": {
|
|
193
191
|
"enum": {
|
|
@@ -211,7 +209,7 @@ export default {
|
|
|
211
209
|
"unevaluatedProperties": false
|
|
212
210
|
},
|
|
213
211
|
"components": {
|
|
214
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
212
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#components-object",
|
|
215
213
|
"type": "object",
|
|
216
214
|
"properties": {
|
|
217
215
|
"schemas": {
|
|
@@ -271,7 +269,7 @@ export default {
|
|
|
271
269
|
"pathItems": {
|
|
272
270
|
"type": "object",
|
|
273
271
|
"additionalProperties": {
|
|
274
|
-
"$ref": "#/$defs/path-item
|
|
272
|
+
"$ref": "#/$defs/path-item"
|
|
275
273
|
}
|
|
276
274
|
}
|
|
277
275
|
},
|
|
@@ -287,7 +285,7 @@ export default {
|
|
|
287
285
|
"unevaluatedProperties": false
|
|
288
286
|
},
|
|
289
287
|
"paths": {
|
|
290
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
288
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#paths-object",
|
|
291
289
|
"type": "object",
|
|
292
290
|
"patternProperties": {
|
|
293
291
|
"^/": {
|
|
@@ -298,9 +296,13 @@ export default {
|
|
|
298
296
|
"unevaluatedProperties": false
|
|
299
297
|
},
|
|
300
298
|
"path-item": {
|
|
301
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
299
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#path-item-object",
|
|
302
300
|
"type": "object",
|
|
303
301
|
"properties": {
|
|
302
|
+
"$ref": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"format": "uri-reference"
|
|
305
|
+
},
|
|
304
306
|
"summary": {
|
|
305
307
|
"type": "string"
|
|
306
308
|
},
|
|
@@ -347,22 +349,8 @@ export default {
|
|
|
347
349
|
"$ref": "#/$defs/specification-extensions",
|
|
348
350
|
"unevaluatedProperties": false
|
|
349
351
|
},
|
|
350
|
-
"path-item-or-reference": {
|
|
351
|
-
"if": {
|
|
352
|
-
"type": "object",
|
|
353
|
-
"required": [
|
|
354
|
-
"$ref"
|
|
355
|
-
]
|
|
356
|
-
},
|
|
357
|
-
"then": {
|
|
358
|
-
"$ref": "#/$defs/reference"
|
|
359
|
-
},
|
|
360
|
-
"else": {
|
|
361
|
-
"$ref": "#/$defs/path-item"
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
352
|
"operation": {
|
|
365
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
353
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#operation-object",
|
|
366
354
|
"type": "object",
|
|
367
355
|
"properties": {
|
|
368
356
|
"tags": {
|
|
@@ -422,7 +410,7 @@ export default {
|
|
|
422
410
|
"unevaluatedProperties": false
|
|
423
411
|
},
|
|
424
412
|
"external-documentation": {
|
|
425
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
413
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object",
|
|
426
414
|
"type": "object",
|
|
427
415
|
"properties": {
|
|
428
416
|
"description": {
|
|
@@ -430,7 +418,7 @@ export default {
|
|
|
430
418
|
},
|
|
431
419
|
"url": {
|
|
432
420
|
"type": "string",
|
|
433
|
-
"format": "uri"
|
|
421
|
+
"format": "uri-reference"
|
|
434
422
|
}
|
|
435
423
|
},
|
|
436
424
|
"required": [
|
|
@@ -440,7 +428,7 @@ export default {
|
|
|
440
428
|
"unevaluatedProperties": false
|
|
441
429
|
},
|
|
442
430
|
"parameter": {
|
|
443
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
431
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#parameter-object",
|
|
444
432
|
"type": "object",
|
|
445
433
|
"properties": {
|
|
446
434
|
"name": {
|
|
@@ -535,7 +523,7 @@ export default {
|
|
|
535
523
|
"$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"
|
|
536
524
|
},
|
|
537
525
|
{
|
|
538
|
-
"$ref": "#/$defs/
|
|
526
|
+
"$ref": "#/$defs/styles-for-form"
|
|
539
527
|
}
|
|
540
528
|
],
|
|
541
529
|
"$defs": {
|
|
@@ -552,9 +540,6 @@ export default {
|
|
|
552
540
|
},
|
|
553
541
|
"then": {
|
|
554
542
|
"properties": {
|
|
555
|
-
"name": {
|
|
556
|
-
"pattern": "[^/#?]+$"
|
|
557
|
-
},
|
|
558
543
|
"style": {
|
|
559
544
|
"default": "simple",
|
|
560
545
|
"enum": [
|
|
@@ -640,32 +625,6 @@ export default {
|
|
|
640
625
|
}
|
|
641
626
|
}
|
|
642
627
|
}
|
|
643
|
-
},
|
|
644
|
-
"styles-for-form": {
|
|
645
|
-
"if": {
|
|
646
|
-
"properties": {
|
|
647
|
-
"style": {
|
|
648
|
-
"const": "form"
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
"required": [
|
|
652
|
-
"style"
|
|
653
|
-
]
|
|
654
|
-
},
|
|
655
|
-
"then": {
|
|
656
|
-
"properties": {
|
|
657
|
-
"explode": {
|
|
658
|
-
"default": true
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
},
|
|
662
|
-
"else": {
|
|
663
|
-
"properties": {
|
|
664
|
-
"explode": {
|
|
665
|
-
"default": false
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
628
|
}
|
|
670
629
|
}
|
|
671
630
|
}
|
|
@@ -688,7 +647,7 @@ export default {
|
|
|
688
647
|
}
|
|
689
648
|
},
|
|
690
649
|
"request-body": {
|
|
691
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
650
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#request-body-object",
|
|
692
651
|
"type": "object",
|
|
693
652
|
"properties": {
|
|
694
653
|
"description": {
|
|
@@ -723,7 +682,7 @@ export default {
|
|
|
723
682
|
}
|
|
724
683
|
},
|
|
725
684
|
"content": {
|
|
726
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
685
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10",
|
|
727
686
|
"type": "object",
|
|
728
687
|
"additionalProperties": {
|
|
729
688
|
"$ref": "#/$defs/media-type"
|
|
@@ -733,7 +692,7 @@ export default {
|
|
|
733
692
|
}
|
|
734
693
|
},
|
|
735
694
|
"media-type": {
|
|
736
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
695
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#media-type-object",
|
|
737
696
|
"type": "object",
|
|
738
697
|
"properties": {
|
|
739
698
|
"schema": {
|
|
@@ -757,7 +716,7 @@ export default {
|
|
|
757
716
|
"unevaluatedProperties": false
|
|
758
717
|
},
|
|
759
718
|
"encoding": {
|
|
760
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
719
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#encoding-object",
|
|
761
720
|
"type": "object",
|
|
762
721
|
"properties": {
|
|
763
722
|
"contentType": {
|
|
@@ -792,41 +751,13 @@ export default {
|
|
|
792
751
|
"$ref": "#/$defs/specification-extensions"
|
|
793
752
|
},
|
|
794
753
|
{
|
|
795
|
-
"$ref": "#/$defs/
|
|
754
|
+
"$ref": "#/$defs/styles-for-form"
|
|
796
755
|
}
|
|
797
756
|
],
|
|
798
|
-
"unevaluatedProperties": false
|
|
799
|
-
"$defs": {
|
|
800
|
-
"explode-default": {
|
|
801
|
-
"if": {
|
|
802
|
-
"properties": {
|
|
803
|
-
"style": {
|
|
804
|
-
"const": "form"
|
|
805
|
-
}
|
|
806
|
-
},
|
|
807
|
-
"required": [
|
|
808
|
-
"style"
|
|
809
|
-
]
|
|
810
|
-
},
|
|
811
|
-
"then": {
|
|
812
|
-
"properties": {
|
|
813
|
-
"explode": {
|
|
814
|
-
"default": true
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
"else": {
|
|
819
|
-
"properties": {
|
|
820
|
-
"explode": {
|
|
821
|
-
"default": false
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
}
|
|
757
|
+
"unevaluatedProperties": false
|
|
827
758
|
},
|
|
828
759
|
"responses": {
|
|
829
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
760
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#responses-object",
|
|
830
761
|
"type": "object",
|
|
831
762
|
"properties": {
|
|
832
763
|
"default": {
|
|
@@ -840,10 +771,21 @@ export default {
|
|
|
840
771
|
},
|
|
841
772
|
"minProperties": 1,
|
|
842
773
|
"$ref": "#/$defs/specification-extensions",
|
|
843
|
-
"unevaluatedProperties": false
|
|
774
|
+
"unevaluatedProperties": false,
|
|
775
|
+
"if": {
|
|
776
|
+
"$comment": "either default, or at least one response code property must exist",
|
|
777
|
+
"patternProperties": {
|
|
778
|
+
"^[1-5](?:[0-9]{2}|XX)$": false
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"then": {
|
|
782
|
+
"required": [
|
|
783
|
+
"default"
|
|
784
|
+
]
|
|
785
|
+
}
|
|
844
786
|
},
|
|
845
787
|
"response": {
|
|
846
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
788
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#response-object",
|
|
847
789
|
"type": "object",
|
|
848
790
|
"properties": {
|
|
849
791
|
"description": {
|
|
@@ -886,11 +828,11 @@ export default {
|
|
|
886
828
|
}
|
|
887
829
|
},
|
|
888
830
|
"callbacks": {
|
|
889
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
831
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#callback-object",
|
|
890
832
|
"type": "object",
|
|
891
833
|
"$ref": "#/$defs/specification-extensions",
|
|
892
834
|
"additionalProperties": {
|
|
893
|
-
"$ref": "#/$defs/path-item
|
|
835
|
+
"$ref": "#/$defs/path-item"
|
|
894
836
|
}
|
|
895
837
|
},
|
|
896
838
|
"callbacks-or-reference": {
|
|
@@ -908,7 +850,7 @@ export default {
|
|
|
908
850
|
}
|
|
909
851
|
},
|
|
910
852
|
"example": {
|
|
911
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
853
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#example-object",
|
|
912
854
|
"type": "object",
|
|
913
855
|
"properties": {
|
|
914
856
|
"summary": {
|
|
@@ -920,7 +862,7 @@ export default {
|
|
|
920
862
|
"value": true,
|
|
921
863
|
"externalValue": {
|
|
922
864
|
"type": "string",
|
|
923
|
-
"format": "uri"
|
|
865
|
+
"format": "uri-reference"
|
|
924
866
|
}
|
|
925
867
|
},
|
|
926
868
|
"not": {
|
|
@@ -947,7 +889,7 @@ export default {
|
|
|
947
889
|
}
|
|
948
890
|
},
|
|
949
891
|
"link": {
|
|
950
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
892
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#link-object",
|
|
951
893
|
"type": "object",
|
|
952
894
|
"properties": {
|
|
953
895
|
"operationRef": {
|
|
@@ -998,7 +940,7 @@ export default {
|
|
|
998
940
|
}
|
|
999
941
|
},
|
|
1000
942
|
"header": {
|
|
1001
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
943
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#header-object",
|
|
1002
944
|
"type": "object",
|
|
1003
945
|
"properties": {
|
|
1004
946
|
"description": {
|
|
@@ -1066,7 +1008,7 @@ export default {
|
|
|
1066
1008
|
}
|
|
1067
1009
|
},
|
|
1068
1010
|
"tag": {
|
|
1069
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
1011
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#tag-object",
|
|
1070
1012
|
"type": "object",
|
|
1071
1013
|
"properties": {
|
|
1072
1014
|
"name": {
|
|
@@ -1086,7 +1028,7 @@ export default {
|
|
|
1086
1028
|
"unevaluatedProperties": false
|
|
1087
1029
|
},
|
|
1088
1030
|
"reference": {
|
|
1089
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
1031
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#reference-object",
|
|
1090
1032
|
"type": "object",
|
|
1091
1033
|
"properties": {
|
|
1092
1034
|
"$ref": {
|
|
@@ -1099,11 +1041,10 @@ export default {
|
|
|
1099
1041
|
"description": {
|
|
1100
1042
|
"type": "string"
|
|
1101
1043
|
}
|
|
1102
|
-
}
|
|
1103
|
-
"unevaluatedProperties": false
|
|
1044
|
+
}
|
|
1104
1045
|
},
|
|
1105
1046
|
"schema": {
|
|
1106
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
1047
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#schema-object",
|
|
1107
1048
|
"$dynamicAnchor": "meta",
|
|
1108
1049
|
"type": [
|
|
1109
1050
|
"object",
|
|
@@ -1111,7 +1052,7 @@ export default {
|
|
|
1111
1052
|
]
|
|
1112
1053
|
},
|
|
1113
1054
|
"security-scheme": {
|
|
1114
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
1055
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object",
|
|
1115
1056
|
"type": "object",
|
|
1116
1057
|
"properties": {
|
|
1117
1058
|
"type": {
|
|
@@ -1265,7 +1206,7 @@ export default {
|
|
|
1265
1206
|
"properties": {
|
|
1266
1207
|
"openIdConnectUrl": {
|
|
1267
1208
|
"type": "string",
|
|
1268
|
-
"format": "uri"
|
|
1209
|
+
"format": "uri-reference"
|
|
1269
1210
|
}
|
|
1270
1211
|
},
|
|
1271
1212
|
"required": [
|
|
@@ -1313,11 +1254,11 @@ export default {
|
|
|
1313
1254
|
"properties": {
|
|
1314
1255
|
"authorizationUrl": {
|
|
1315
1256
|
"type": "string",
|
|
1316
|
-
"format": "uri"
|
|
1257
|
+
"format": "uri-reference"
|
|
1317
1258
|
},
|
|
1318
1259
|
"refreshUrl": {
|
|
1319
1260
|
"type": "string",
|
|
1320
|
-
"format": "uri"
|
|
1261
|
+
"format": "uri-reference"
|
|
1321
1262
|
},
|
|
1322
1263
|
"scopes": {
|
|
1323
1264
|
"$ref": "#/$defs/map-of-strings"
|
|
@@ -1335,11 +1276,11 @@ export default {
|
|
|
1335
1276
|
"properties": {
|
|
1336
1277
|
"tokenUrl": {
|
|
1337
1278
|
"type": "string",
|
|
1338
|
-
"format": "uri"
|
|
1279
|
+
"format": "uri-reference"
|
|
1339
1280
|
},
|
|
1340
1281
|
"refreshUrl": {
|
|
1341
1282
|
"type": "string",
|
|
1342
|
-
"format": "uri"
|
|
1283
|
+
"format": "uri-reference"
|
|
1343
1284
|
},
|
|
1344
1285
|
"scopes": {
|
|
1345
1286
|
"$ref": "#/$defs/map-of-strings"
|
|
@@ -1357,11 +1298,11 @@ export default {
|
|
|
1357
1298
|
"properties": {
|
|
1358
1299
|
"tokenUrl": {
|
|
1359
1300
|
"type": "string",
|
|
1360
|
-
"format": "uri"
|
|
1301
|
+
"format": "uri-reference"
|
|
1361
1302
|
},
|
|
1362
1303
|
"refreshUrl": {
|
|
1363
1304
|
"type": "string",
|
|
1364
|
-
"format": "uri"
|
|
1305
|
+
"format": "uri-reference"
|
|
1365
1306
|
},
|
|
1366
1307
|
"scopes": {
|
|
1367
1308
|
"$ref": "#/$defs/map-of-strings"
|
|
@@ -1379,15 +1320,15 @@ export default {
|
|
|
1379
1320
|
"properties": {
|
|
1380
1321
|
"authorizationUrl": {
|
|
1381
1322
|
"type": "string",
|
|
1382
|
-
"format": "uri"
|
|
1323
|
+
"format": "uri-reference"
|
|
1383
1324
|
},
|
|
1384
1325
|
"tokenUrl": {
|
|
1385
1326
|
"type": "string",
|
|
1386
|
-
"format": "uri"
|
|
1327
|
+
"format": "uri-reference"
|
|
1387
1328
|
},
|
|
1388
1329
|
"refreshUrl": {
|
|
1389
1330
|
"type": "string",
|
|
1390
|
-
"format": "uri"
|
|
1331
|
+
"format": "uri-reference"
|
|
1391
1332
|
},
|
|
1392
1333
|
"scopes": {
|
|
1393
1334
|
"$ref": "#/$defs/map-of-strings"
|
|
@@ -1404,7 +1345,7 @@ export default {
|
|
|
1404
1345
|
}
|
|
1405
1346
|
},
|
|
1406
1347
|
"security-requirement": {
|
|
1407
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
1348
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object",
|
|
1408
1349
|
"type": "object",
|
|
1409
1350
|
"additionalProperties": {
|
|
1410
1351
|
"type": "array",
|
|
@@ -1414,7 +1355,7 @@ export default {
|
|
|
1414
1355
|
}
|
|
1415
1356
|
},
|
|
1416
1357
|
"specification-extensions": {
|
|
1417
|
-
"$comment": "https://spec.openapis.org/oas/v3.1
|
|
1358
|
+
"$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions",
|
|
1418
1359
|
"patternProperties": {
|
|
1419
1360
|
"^x-": true
|
|
1420
1361
|
}
|
|
@@ -1435,6 +1376,32 @@ export default {
|
|
|
1435
1376
|
"additionalProperties": {
|
|
1436
1377
|
"type": "string"
|
|
1437
1378
|
}
|
|
1379
|
+
},
|
|
1380
|
+
"styles-for-form": {
|
|
1381
|
+
"if": {
|
|
1382
|
+
"properties": {
|
|
1383
|
+
"style": {
|
|
1384
|
+
"const": "form"
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
"required": [
|
|
1388
|
+
"style"
|
|
1389
|
+
]
|
|
1390
|
+
},
|
|
1391
|
+
"then": {
|
|
1392
|
+
"properties": {
|
|
1393
|
+
"explode": {
|
|
1394
|
+
"default": true
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
"else": {
|
|
1399
|
+
"properties": {
|
|
1400
|
+
"explode": {
|
|
1401
|
+
"default": false
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1438
1405
|
}
|
|
1439
1406
|
}
|
|
1440
1407
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$vocabulary": {
|
|
4
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
5
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
6
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
7
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
8
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
9
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
10
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true,
|
|
11
|
+
"https://spec.openapis.org/oas/3.2/vocab/base": false
|
|
12
|
+
},
|
|
13
|
+
"$dynamicAnchor": "meta",
|
|
14
|
+
|
|
15
|
+
"title": "OpenAPI 3.2 Schema Object Dialect",
|
|
16
|
+
"description": "A JSON Schema dialect describing schemas found in OpenAPI v3.2 Descriptions",
|
|
17
|
+
|
|
18
|
+
"allOf": [
|
|
19
|
+
{ "$ref": "https://json-schema.org/draft/2020-12/schema" },
|
|
20
|
+
{ "$ref": "https://spec.openapis.org/oas/3.2/meta/base" }
|
|
21
|
+
]
|
|
22
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Json } from "@hyperjump/json-pointer";
|
|
2
|
+
import type { JsonSchemaType } from "../lib/common.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export type OasSchema32 = boolean | {
|
|
6
|
+
$schema?: "https://spec.openapis.org/oas/3.2/dialect/base";
|
|
7
|
+
$id?: string;
|
|
8
|
+
$anchor?: string;
|
|
9
|
+
$ref?: string;
|
|
10
|
+
$dynamicRef?: string;
|
|
11
|
+
$dynamicAnchor?: string;
|
|
12
|
+
$vocabulary?: Record<string, boolean>;
|
|
13
|
+
$comment?: string;
|
|
14
|
+
$defs?: Record<string, OasSchema32>;
|
|
15
|
+
additionalItems?: OasSchema32;
|
|
16
|
+
unevaluatedItems?: OasSchema32;
|
|
17
|
+
prefixItems?: OasSchema32[];
|
|
18
|
+
items?: OasSchema32;
|
|
19
|
+
contains?: OasSchema32;
|
|
20
|
+
additionalProperties?: OasSchema32;
|
|
21
|
+
unevaluatedProperties?: OasSchema32;
|
|
22
|
+
properties?: Record<string, OasSchema32>;
|
|
23
|
+
patternProperties?: Record<string, OasSchema32>;
|
|
24
|
+
dependentSchemas?: Record<string, OasSchema32>;
|
|
25
|
+
propertyNames?: OasSchema32;
|
|
26
|
+
if?: OasSchema32;
|
|
27
|
+
then?: OasSchema32;
|
|
28
|
+
else?: OasSchema32;
|
|
29
|
+
allOf?: OasSchema32[];
|
|
30
|
+
anyOf?: OasSchema32[];
|
|
31
|
+
oneOf?: OasSchema32[];
|
|
32
|
+
not?: OasSchema32;
|
|
33
|
+
multipleOf?: number;
|
|
34
|
+
maximum?: number;
|
|
35
|
+
exclusiveMaximum?: number;
|
|
36
|
+
minimum?: number;
|
|
37
|
+
exclusiveMinimum?: number;
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
minLength?: number;
|
|
40
|
+
pattern?: string;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
maxContains?: number;
|
|
45
|
+
minContains?: number;
|
|
46
|
+
maxProperties?: number;
|
|
47
|
+
minProperties?: number;
|
|
48
|
+
required?: string[];
|
|
49
|
+
dependentRequired?: Record<string, string[]>;
|
|
50
|
+
const?: Json;
|
|
51
|
+
enum?: Json[];
|
|
52
|
+
type?: JsonSchemaType | JsonSchemaType[];
|
|
53
|
+
title?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
default?: Json;
|
|
56
|
+
deprecated?: boolean;
|
|
57
|
+
readOnly?: boolean;
|
|
58
|
+
writeOnly?: boolean;
|
|
59
|
+
examples?: Json[];
|
|
60
|
+
format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex";
|
|
61
|
+
contentMediaType?: string;
|
|
62
|
+
contentEncoding?: string;
|
|
63
|
+
contentSchema?: OasSchema32;
|
|
64
|
+
example?: Json;
|
|
65
|
+
discriminator?: Discriminator;
|
|
66
|
+
externalDocs?: ExternalDocs;
|
|
67
|
+
xml?: Xml;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
type Discriminator = {
|
|
71
|
+
propertyName: string;
|
|
72
|
+
mappings?: Record<string, string>;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
type ExternalDocs = {
|
|
76
|
+
url: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
type Xml = {
|
|
81
|
+
name?: string;
|
|
82
|
+
namespace?: string;
|
|
83
|
+
prefix?: string;
|
|
84
|
+
attribute?: boolean;
|
|
85
|
+
wrapped?: boolean;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// TODO: Fill in this type when 3.2 is published
|
|
89
|
+
export type OpenApi32 = unknown;
|
|
90
|
+
|
|
91
|
+
export * from "../lib/index.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { addKeyword, defineVocabulary } from "../lib/keywords.js";
|
|
2
|
+
import { registerSchema } from "../lib/index.js";
|
|
3
|
+
import "../lib/openapi.js";
|
|
4
|
+
|
|
5
|
+
import dialectSchema from "./dialect/base.js";
|
|
6
|
+
import vocabularySchema from "./meta/base.js";
|
|
7
|
+
import schema from "./schema.js";
|
|
8
|
+
import schemaBase from "./schema-base.js";
|
|
9
|
+
import schemaDraft2020 from "./schema-draft-2020-12.js";
|
|
10
|
+
import schemaDraft2019 from "./schema-draft-2019-09.js";
|
|
11
|
+
import schemaDraft07 from "./schema-draft-07.js";
|
|
12
|
+
import schemaDraft06 from "./schema-draft-06.js";
|
|
13
|
+
import schemaDraft04 from "./schema-draft-04.js";
|
|
14
|
+
|
|
15
|
+
import discriminator from "../openapi-3-0/discriminator.js";
|
|
16
|
+
import example from "../openapi-3-0/example.js";
|
|
17
|
+
import externalDocs from "../openapi-3-0/externalDocs.js";
|
|
18
|
+
import xml from "../openapi-3-0/xml.js";
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export * from "../draft-2020-12/index.js";
|
|
22
|
+
|
|
23
|
+
addKeyword(discriminator);
|
|
24
|
+
addKeyword(example);
|
|
25
|
+
addKeyword(externalDocs);
|
|
26
|
+
addKeyword(xml);
|
|
27
|
+
|
|
28
|
+
defineVocabulary("https://spec.openapis.org/oas/3.2/vocab/base", {
|
|
29
|
+
"discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator",
|
|
30
|
+
"example": "https://spec.openapis.org/oas/3.0/keyword/example",
|
|
31
|
+
"externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs",
|
|
32
|
+
"xml": "https://spec.openapis.org/oas/3.0/keyword/xml"
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.2/meta/base");
|
|
36
|
+
registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.2/dialect/base");
|
|
37
|
+
|
|
38
|
+
// Current Schemas
|
|
39
|
+
registerSchema(schema, "https://spec.openapis.org/oas/3.2/schema");
|
|
40
|
+
registerSchema(schema, "https://spec.openapis.org/oas/3.2/schema/latest");
|
|
41
|
+
registerSchema(schemaBase, "https://spec.openapis.org/oas/3.2/schema-base");
|
|
42
|
+
registerSchema(schemaBase, "https://spec.openapis.org/oas/3.2/schema-base/latest");
|
|
43
|
+
|
|
44
|
+
// Alternative dialect schemas
|
|
45
|
+
registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.2/schema-draft-2020-12");
|
|
46
|
+
registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.2/schema-draft-2019-09");
|
|
47
|
+
registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.2/schema-draft-07");
|
|
48
|
+
registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.2/schema-draft-06");
|
|
49
|
+
registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.2/schema-draft-04");
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$dynamicAnchor": "meta",
|
|
4
|
+
|
|
5
|
+
"title": "OAS Base Vocabulary",
|
|
6
|
+
"description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect",
|
|
7
|
+
|
|
8
|
+
"type": ["object", "boolean"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"example": true,
|
|
11
|
+
"discriminator": { "$ref": "#/$defs/discriminator" },
|
|
12
|
+
"externalDocs": { "$ref": "#/$defs/external-docs" },
|
|
13
|
+
"xml": { "$ref": "#/$defs/xml" }
|
|
14
|
+
},
|
|
15
|
+
"$defs": {
|
|
16
|
+
"extensible": {
|
|
17
|
+
"patternProperties": {
|
|
18
|
+
"^x-": true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"discriminator": {
|
|
22
|
+
"$ref": "#/$defs/extensible",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"propertyName": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"mapping": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": ["propertyName"],
|
|
36
|
+
"unevaluatedProperties": false
|
|
37
|
+
},
|
|
38
|
+
"external-docs": {
|
|
39
|
+
"$ref": "#/$defs/extensible",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"url": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "uri-reference"
|
|
45
|
+
},
|
|
46
|
+
"description": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": ["url"],
|
|
51
|
+
"unevaluatedProperties": false
|
|
52
|
+
},
|
|
53
|
+
"xml": {
|
|
54
|
+
"$ref": "#/$defs/extensible",
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"name": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
"namespace": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"format": "uri"
|
|
63
|
+
},
|
|
64
|
+
"prefix": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"attribute": {
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
"wrapped": {
|
|
71
|
+
"type": "boolean"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"unevaluatedProperties": false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
|
|
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
|
+
"https://spec.openapis.org/oas/3.2/vocab/base": false
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"description": "The description of OpenAPI v3.2.x Documents using the OpenAPI JSON Schema dialect",
|
|
16
|
+
|
|
17
|
+
"$ref": "https://spec.openapis.org/oas/3.2/schema",
|
|
18
|
+
"properties": {
|
|
19
|
+
"jsonSchemaDialect": { "$ref": "#/$defs/dialect" }
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"$defs": {
|
|
23
|
+
"dialect": { "const": "https://spec.openapis.org/oas/3.2/dialect/base" },
|
|
24
|
+
|
|
25
|
+
"schema": {
|
|
26
|
+
"$dynamicAnchor": "meta",
|
|
27
|
+
"$ref": "https://spec.openapis.org/oas/3.2/dialect/base",
|
|
28
|
+
"properties": {
|
|
29
|
+
"$schema": { "$ref": "#/$defs/dialect" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
|
|
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
|
+
"https://spec.openapis.org/oas/3.2/vocab/base": false
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"description": "OpenAPI v3.2.x documents using draft-04 JSON Schemas",
|
|
16
|
+
|
|
17
|
+
"$ref": "https://spec.openapis.org/oas/3.2/schema",
|
|
18
|
+
"properties": {
|
|
19
|
+
"jsonSchemaDialect": { "$ref": "#/$defs/dialect" }
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"$defs": {
|
|
23
|
+
"dialect": { "const": "http://json-schema.org/draft-04/schema#" },
|
|
24
|
+
|
|
25
|
+
"schema": {
|
|
26
|
+
"$dynamicAnchor": "meta",
|
|
27
|
+
"$ref": "https://spec.openapis.org/oas/3.2/dialect/base",
|
|
28
|
+
"properties": {
|
|
29
|
+
"$schema": { "$ref": "#/$defs/dialect" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
|
|
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
|
+
"https://spec.openapis.org/oas/3.2/vocab/base": false
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"description": "OpenAPI v3.2.x documents using draft-06 JSON Schemas",
|
|
16
|
+
|
|
17
|
+
"$ref": "https://spec.openapis.org/oas/3.2/schema",
|
|
18
|
+
"properties": {
|
|
19
|
+
"jsonSchemaDialect": { "$ref": "#/$defs/dialect" }
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"$defs": {
|
|
23
|
+
"dialect": { "const": "http://json-schema.org/draft-06/schema#" },
|
|
24
|
+
|
|
25
|
+
"schema": {
|
|
26
|
+
"$dynamicAnchor": "meta",
|
|
27
|
+
"$ref": "https://spec.openapis.org/oas/3.2/dialect/base",
|
|
28
|
+
"properties": {
|
|
29
|
+
"$schema": { "$ref": "#/$defs/dialect" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
|
|
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
|
+
"https://spec.openapis.org/oas/3.2/vocab/base": false
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"description": "OpenAPI v3.2.x documents using draft-07 JSON Schemas",
|
|
16
|
+
|
|
17
|
+
"$ref": "https://spec.openapis.org/oas/3.2/schema",
|
|
18
|
+
"properties": {
|
|
19
|
+
"jsonSchemaDialect": { "$ref": "#/$defs/dialect" }
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"$defs": {
|
|
23
|
+
"dialect": { "const": "http://json-schema.org/draft-07/schema#" },
|
|
24
|
+
|
|
25
|
+
"schema": {
|
|
26
|
+
"$dynamicAnchor": "meta",
|
|
27
|
+
"$ref": "https://spec.openapis.org/oas/3.2/dialect/base",
|
|
28
|
+
"properties": {
|
|
29
|
+
"$schema": { "$ref": "#/$defs/dialect" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
|
|
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
|
+
"https://spec.openapis.org/oas/3.2/vocab/base": false
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"description": "openapi v3.2.x documents using 2019-09 json schemas",
|
|
16
|
+
|
|
17
|
+
"$ref": "https://spec.openapis.org/oas/3.2/schema",
|
|
18
|
+
"properties": {
|
|
19
|
+
"jsonschemadialect": { "$ref": "#/$defs/dialect" }
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"$defs": {
|
|
23
|
+
"dialect": { "const": "https://json-schema.org/draft/2019-09/schema" },
|
|
24
|
+
|
|
25
|
+
"schema": {
|
|
26
|
+
"$dynamicanchor": "meta",
|
|
27
|
+
"$ref": "https://spec.openapis.org/oas/3.2/dialect/base",
|
|
28
|
+
"properties": {
|
|
29
|
+
"$schema": { "$ref": "#/$defs/dialect" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
|
|
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
|
+
"https://spec.openapis.org/oas/3.2/vocab/base": false
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"description": "openapi v3.2.x documents using 2020-12 json schemas",
|
|
16
|
+
|
|
17
|
+
"$ref": "https://spec.openapis.org/oas/3.2/schema",
|
|
18
|
+
"properties": {
|
|
19
|
+
"jsonschemadialect": { "$ref": "#/$defs/dialect" }
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"$defs": {
|
|
23
|
+
"dialect": { "const": "https://json-schema.org/draft/2020-12/schema" },
|
|
24
|
+
|
|
25
|
+
"schema": {
|
|
26
|
+
"$dynamicanchor": "meta",
|
|
27
|
+
"$ref": "https://spec.openapis.org/oas/3.2/dialect/base",
|
|
28
|
+
"properties": {
|
|
29
|
+
"$schema": { "$ref": "#/$defs/dialect" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
package/package.json
CHANGED