|
7 | 7 | "$recursiveAnchor": true,
|
8 | 8 | "title": "OpenAPI Vocabulary Schema",
|
9 | 9 | "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" |
21 | 13 | },
|
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 | + ] |
26 | 28 | },
|
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 |
75 | 33 | },
|
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" |
98 | 36 | },
|
99 |
| - { |
100 |
| - "$ref": "#/$defs/Reference" // TODO |
| 37 | + "example": { |
| 38 | + "deprecated": true |
101 | 39 | },
|
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" |
104 | 45 | }
|
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 | + } |
143 | 47 | }
|
144 |
| - }, |
| 48 | + ], |
145 | 49 | "patternProperties": {
|
146 | 50 | "^x-": {
|
147 | 51 | }
|
148 | 52 | },
|
149 | 53 | "additionalProperties": false,
|
150 |
| - |
151 | 54 | "$defs": {
|
| 55 | + "AllowedTypes": { |
| 56 | + "type": "string", |
| 57 | + "enum": [ |
| 58 | + "array", |
| 59 | + "boolean", |
| 60 | + "integer", |
| 61 | + "number", |
| 62 | + "object", |
| 63 | + "string", |
| 64 | + "null" |
| 65 | + ] |
| 66 | + } |
152 | 67 | "Discriminator": {
|
153 | 68 | "type": "object",
|
154 | 69 | "required": [
|
|
0 commit comments