Skip to content

Commit ce1b4b6

Browse files
author
Phil Sturgeon
committed
Strip out all the words that match JSON Schema
1 parent 42ed2ce commit ce1b4b6

File tree

2 files changed

+45
-133
lines changed

2 files changed

+45
-133
lines changed

schemas/v3.1/meta-openapi.json

+44-129
Original file line numberDiff line numberDiff line change
@@ -7,148 +7,63 @@
77
"$recursiveAnchor": true,
88
"title": "OpenAPI Vocabulary Schema",
99
"type": ["object", "boolean"],
10-
"properties": {
11-
"type": {
12-
"type": "string",
13-
"enum": [
14-
"array",
15-
"boolean",
16-
"integer",
17-
"number",
18-
"object",
19-
"string"
20-
]
10+
"allOf": [
11+
{
12+
"$ref": "http://json-schema.org/draft/2019-WIP/schema"
2113
},
22-
"not": {
23-
"oneOf": [
24-
{
25-
"$ref": "#/$defs/Schema" # can i use recursiveAnchor for this or how do i ref myself
14+
{
15+
"properties": {
16+
"type": {
17+
"oneOf" : [
18+
{
19+
"$ref": "#/$defs/AllowedTypes"
20+
},
21+
{
22+
"type": "array",
23+
"items": {
24+
"$ref": "#/$defs/AllowedTypes"
25+
}
26+
}
27+
]
2628
},
27-
{
28-
"$ref": "#/$defs/Reference" // this is in the openapi-vocabulary.json any way to ref back up to it
29-
}
30-
]
31-
},
32-
"allOf": {
33-
"type": "array",
34-
"items": {
35-
"oneOf": [
36-
{
37-
"$ref": "#/$defs/Schema"
38-
},
39-
{
40-
"$ref": "#/$defs/Reference"
41-
}
42-
]
43-
}
44-
},
45-
"oneOf": {
46-
"type": "array",
47-
"items": {
48-
"oneOf": [
49-
{
50-
"$ref": "#/$defs/Schema"
51-
},
52-
{
53-
"$ref": "#/$defs/Reference"
54-
}
55-
]
56-
}
57-
},
58-
"anyOf": {
59-
"type": "array",
60-
"items": {
61-
"oneOf": [
62-
{
63-
"$ref": "#/$defs/Schema"
64-
},
65-
{
66-
"$ref": "#/$defs/Reference"
67-
}
68-
]
69-
}
70-
},
71-
"items": {
72-
"oneOf": [
73-
{
74-
"$ref": "#/$defs/Schema"
29+
"nullable": {
30+
"type": "boolean",
31+
"default": false,
32+
"deprecated": true
7533
},
76-
{
77-
"$ref": "#/$defs/Reference"
78-
}
79-
]
80-
},
81-
"properties": {
82-
"type": "object",
83-
"additionalProperties": {
84-
"oneOf": [
85-
{
86-
"$ref": "#/$defs/Schema"
87-
},
88-
{
89-
"$ref": "#/$defs/Reference"
90-
}
91-
]
92-
}
93-
},
94-
"additionalProperties": {
95-
"oneOf": [
96-
{
97-
"$ref": "#/$defs/Schema" // TODO
34+
"discriminator": {
35+
"$ref": "#/$defs/Discriminator"
9836
},
99-
{
100-
"$ref": "#/$defs/Reference" // TODO
37+
"example": {
38+
"deprecated": true
10139
},
102-
{
103-
"type": "boolean"
40+
"externalDocs": {
41+
"$ref": "#/$defs/ExternalDocumentation" // how to reference this from openapi-vocabulary.json
42+
},
43+
"xml": {
44+
"$ref": "#/$defs/XML"
10445
}
105-
],
106-
"default": true
107-
},
108-
"description": {
109-
"type": "string"
110-
},
111-
"format": {
112-
"type": "string"
113-
},
114-
"default": {
115-
},
116-
"nullable": {
117-
"type": "boolean",
118-
"default": false,
119-
"deprecated": true
120-
},
121-
"discriminator": {
122-
"$ref": "#/$defs/Discriminator"
123-
},
124-
"readOnly": {
125-
"type": "boolean",
126-
"default": false
127-
},
128-
"writeOnly": {
129-
"type": "boolean",
130-
"default": false
131-
},
132-
"example": {
133-
},
134-
"externalDocs": {
135-
"$ref": "#/$defs/ExternalDocumentation" // TODO
136-
},
137-
"deprecated": {
138-
"type": "boolean",
139-
"default": false
140-
},
141-
"xml": {
142-
"$ref": "#/$defs/XML"
46+
}
14347
}
144-
},
48+
],
14549
"patternProperties": {
14650
"^x-": {
14751
}
14852
},
14953
"additionalProperties": false,
150-
15154
"$defs": {
55+
"AllowedTypes": {
56+
"type": "string",
57+
"enum": [
58+
"array",
59+
"boolean",
60+
"integer",
61+
"number",
62+
"object",
63+
"string",
64+
"null"
65+
]
66+
}
15267
"Discriminator": {
15368
"type": "object",
15469
"required": [

schemas/v3.1/openapi-vocabulary.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,7 @@
344344
"additionalProperties": false
345345
},
346346
"Schema": {
347-
"allOf": [
348-
{"$ref": "http://json-schema.org/draft/2019-WIP/schema"},
349-
{"$ref": "https://spec.openapis.org/oas/3.1/meta"}
350-
]
347+
"$ref": "https://spec.openapis.org/oas/3.1/meta"
351348
},
352349
"Response": {
353350
"type": "object",

0 commit comments

Comments
 (0)