Skip to content

Commit bc4e209

Browse files
committed
Add meta-schema for 3.1 base vocab and dialect
1 parent 42a9e3d commit bc4e209

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

schemas/v3.1/dialect/base.schema.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$id": "https://spec.openapis.org/oas/3.1/dialect/base",
3+
"$schema": "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+
"https://spec.openapis.org/oas/3.1/vocab/base": false
13+
},
14+
"$dynamicAnchor": "meta",
15+
16+
"title": "OpenAPI 3.1 Schema Object Dialect",
17+
"allOf": [
18+
{ "$ref": "https://json-schema.org/draft/2020-12/meta/core" },
19+
{ "$ref": "https://json-schema.org/draft/2020-12/meta/applicator" },
20+
{ "$ref": "https://json-schema.org/draft/2020-12/meta/unevaluated" },
21+
{ "$ref": "https://json-schema.org/draft/2020-12/meta/validation" },
22+
{ "$ref": "https://json-schema.org/draft/2020-12/meta/meta-data" },
23+
{ "$ref": "https://json-schema.org/draft/2020-12/meta/format-annotation" },
24+
{ "$ref": "https://json-schema.org/draft/2020-12/meta/content" },
25+
{ "$ref": "https://spec.openapis.org/oas/3.1/meta/base" }
26+
]
27+
}

schemas/v3.1/meta/base.schema.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"$id": "https://spec.openapis.org/oas/3.1/meta/base",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"$vocabulary": {
5+
"https://spec.openapis.org/oas/3.1/vocab/base": true
6+
},
7+
"$dynamicAnchor": "meta",
8+
"title": "OAS Base vocabulary",
9+
10+
"type": ["object", "boolean"],
11+
"properties": {
12+
"example": true,
13+
"discriminator": { "$ref": "#/$defs/Discriminator" },
14+
"externalDocs": { "$ref": "#/$defs/ExternalDocs" },
15+
"xml": { "$ref": "#/$defs/Xml" }
16+
},
17+
"$defs": {
18+
"Discriminator": {
19+
"type": "object",
20+
"properties": {
21+
"propertyName": {
22+
"type": "string"
23+
},
24+
"mapping": {
25+
"additionalProperties": {
26+
"type": "string"
27+
}
28+
}
29+
},
30+
"patternProperties": {
31+
"^x-": true
32+
},
33+
"required": ["propertyName"],
34+
"additionalProperties": false
35+
},
36+
"ExternalDocs": {
37+
"type": "object",
38+
"properties": {
39+
"url": {
40+
"type": "string",
41+
"format": "uri-reference"
42+
},
43+
"description": {
44+
"type": "string"
45+
}
46+
},
47+
"patternProperties": {
48+
"^x-": true
49+
},
50+
"required": ["url"],
51+
"additionalProperties": false
52+
},
53+
"Xml": {
54+
"type": "object",
55+
"properties": {
56+
"name": {
57+
"type": "string"
58+
},
59+
"namespace": {
60+
"type": "string",
61+
"format": "uri"
62+
},
63+
"prefix": {
64+
"type": "string"
65+
},
66+
"attribute": {
67+
"type": "boolean"
68+
},
69+
"wrapped": {
70+
"type": "boolean"
71+
}
72+
},
73+
"patternProperties": {
74+
"^x-": true
75+
},
76+
"additionalProperties": false
77+
}
78+
}
79+
}

0 commit comments

Comments
 (0)