|
1 | 1 | {
|
2 |
| - "$schema": "https://spec.openapis.org/oas/3.1/schema#", |
3 |
| - "$id": "https://spec.openapis.org/oas/3.1/meta", |
4 |
| - "$vocabulary": { |
5 |
| - "https://specs.openapis.org/oas/3.1/vocab/openapi": true |
6 |
| - }, |
7 |
| - "$recursiveAnchor": true, |
8 |
| - "title": "OpenAPI Vocabulary Schema", |
9 |
| - "type": ["object", "boolean"], |
| 2 | + "$schema": "http://json-schema.org/draft/2019-WIP/schema#", |
| 3 | + "$id": "https://spec.openapis.org/oas/3.1/meta", |
| 4 | + "$vocabulary": { |
| 5 | + "https://specs.openapis.org/oas/3.1/vocab/openapi": true |
| 6 | + }, |
| 7 | + "$recursiveAnchor": true, |
| 8 | + "title": "OpenAPI Vocabulary Schema", |
| 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 | + ] |
| 21 | + }, |
| 22 | + "not": { |
| 23 | + "oneOf": [ |
| 24 | + { |
| 25 | + "$ref": "#/$defs/Schema" # can i use recursiveAnchor for this or how do i ref myself |
| 26 | + }, |
| 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" |
| 75 | + }, |
| 76 | + { |
| 77 | + "$ref": "#/$defs/Reference" |
| 78 | + } |
| 79 | + ] |
| 80 | + }, |
10 | 81 | "properties": {
|
11 |
| - "nullable": { |
12 |
| - "type": "boolean", |
13 |
| - "deprecated": true |
14 |
| - }, |
15 |
| - "externalDocs": { |
16 |
| - "type": "object", |
17 |
| - "properties": { |
18 |
| - "description": { |
19 |
| - "type": "string" |
20 |
| - }, |
21 |
| - "url": { |
22 |
| - "type": "string", |
23 |
| - "format": "uri" |
24 |
| - } |
| 82 | + "type": "object", |
| 83 | + "additionalProperties": { |
| 84 | + "oneOf": [ |
| 85 | + { |
| 86 | + "$ref": "#/$defs/Schema" |
25 | 87 | },
|
26 |
| - "required": ["propertyName"] |
27 |
| - }, |
28 |
| - "discriminator": { |
29 |
| - "type": "object", |
30 |
| - "properties": { |
31 |
| - "propertyName": { |
32 |
| - "type": "string" |
33 |
| - }, |
34 |
| - "mapping": { |
35 |
| - "additionalProperties": { |
36 |
| - "type": "string" |
37 |
| - } |
38 |
| - } |
39 |
| - }, |
40 |
| - "required": ["propertyName"] |
41 |
| - }, |
42 |
| - "example": {}, |
43 |
| - "xml": { |
44 |
| - "type": "object" |
| 88 | + { |
| 89 | + "$ref": "#/$defs/Reference" |
| 90 | + } |
| 91 | + ] |
| 92 | + } |
| 93 | + }, |
| 94 | + "additionalProperties": { |
| 95 | + "oneOf": [ |
| 96 | + { |
| 97 | + "$ref": "#/$defs/Schema" // TODO |
| 98 | + }, |
| 99 | + { |
| 100 | + "$ref": "#/$defs/Reference" // TODO |
| 101 | + }, |
| 102 | + { |
| 103 | + "type": "boolean" |
| 104 | + } |
| 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" |
| 143 | + } |
| 144 | + }, |
| 145 | + "patternProperties": { |
| 146 | + "^x-": { |
| 147 | + } |
| 148 | + }, |
| 149 | + "additionalProperties": false, |
| 150 | + |
| 151 | + "$defs": { |
| 152 | + "Discriminator": { |
| 153 | + "type": "object", |
| 154 | + "required": [ |
| 155 | + "propertyName" |
| 156 | + ], |
| 157 | + "properties": { |
| 158 | + "propertyName": { |
| 159 | + "type": "string" |
| 160 | + }, |
| 161 | + "mapping": { |
| 162 | + "type": "object", |
| 163 | + "additionalProperties": { |
| 164 | + "type": "string" |
| 165 | + } |
| 166 | + } |
| 167 | + } |
| 168 | + }, |
| 169 | + "XML": { |
| 170 | + "type": "object", |
| 171 | + "properties": { |
| 172 | + "name": { |
| 173 | + "type": "string" |
| 174 | + }, |
| 175 | + "namespace": { |
| 176 | + "type": "string", |
| 177 | + "format": "uri" |
| 178 | + }, |
| 179 | + "prefix": { |
| 180 | + "type": "string" |
| 181 | + }, |
| 182 | + "attribute": { |
| 183 | + "type": "boolean", |
| 184 | + "default": false |
| 185 | + }, |
| 186 | + "wrapped": { |
| 187 | + "type": "boolean", |
| 188 | + "default": false |
| 189 | + } |
| 190 | + }, |
| 191 | + "patternProperties": { |
| 192 | + "^x-": { |
45 | 193 | }
|
| 194 | + }, |
| 195 | + "additionalProperties": false |
46 | 196 | }
|
| 197 | + } |
47 | 198 | }
|
0 commit comments