@@ -110,10 +110,8 @@ public class OpenAPIDeserializer {
110
110
"parameters" , "examples" , "requestBodies" , "headers" , "securitySchemes" , "links" , "callbacks" ));
111
111
protected static Set <String > SCHEMA_KEYS = new LinkedHashSet <>(Arrays .asList ("$ref" , "title" , "multipleOf" ,
112
112
"maximum" , "format" , "exclusiveMaximum" , "minimum" , "exclusiveMinimum" , "maxLength" , "minLength" ,
113
- "pattern" ,
114
- "maxItems" , "minItems" , "uniqueItems" , "maxProperties" , "minProperties" , "required" , "enum" , "type" ,
115
- "allOf" ,
116
- "oneOf" , "anyOf" , "not" , "items" , "properties" , "additionalProperties" , "description" , "format" , "default" ,
113
+ "pattern" , "maxItems" , "minItems" , "uniqueItems" , "maxProperties" , "minProperties" , "required" , "enum" , "type" ,
114
+ "allOf" , "oneOf" , "anyOf" , "not" , "items" , "properties" , "additionalProperties" , "description" , "default" ,
117
115
"nullable" , "discriminator" , "readOnly" , "writeOnly" , "xml" , "externalDocs" , "example" , "deprecated" ));
118
116
protected static Set <String > EXAMPLE_KEYS = new LinkedHashSet <>(Arrays .asList ("$ref" , "summary" , "description" ,
119
117
"value" , "externalValue" ));
@@ -136,64 +134,63 @@ public class OpenAPIDeserializer {
136
134
137
135
// 3.1
138
136
// TODO use a map instead for 3.0 and 3.1. Care about compatibility
139
- // TODO OAS3.1 - ensure all OAS 3.1 new keywords are added to the various sets
140
137
protected static Set <String > ROOT_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("openapi" , "info" , "servers" , "paths" ,
141
138
"components" , "security" , "tags" , "externalDocs" , "webhooks" , "jsonSchemaDialect" ));
142
- protected static Set <String > RESERVED_KEYWORDS_31 = new LinkedHashSet <>(Arrays .asList ("x-oai-" ,"x-oas-" ));
139
+ protected static Set <String > RESERVED_KEYWORDS_31 = new LinkedHashSet <>(Arrays .asList ("x-oai-" ,"x-oas-" ));
143
140
protected static Set <String > INFO_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("title" ,"summary" , "description" , "termsOfService"
144
141
, "contact" , "license" , "version" ));
145
142
protected static Set <String > CONTACT_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("name" , "url" , "email" ));
146
143
protected static Set <String > LICENSE_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("name" , "url" , "identifier" ));
147
- protected static Set <String > TAG_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("description" , "name" , "externalDocs" ));
144
+ protected static Set <String > TAG_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("description" , "name" , "externalDocs" ));
148
145
protected static Set <String > RESPONSE_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "description" , "headers" ,
149
- "content" , "links" ));
146
+ "content" , "links" ));
150
147
protected static Set <String > SERVER_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("url" , "description" , "variables" ));
151
148
protected static Set <String > SERVER_VARIABLE_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("enum" , "default" ,
152
- "description" ));
149
+ "description" ));
153
150
protected static Set <String > PATHITEM_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "summary" , "description" ,
154
- "get" , "put" , "post" , "delete" , "head" , "patch" , "options" , "trace" , "servers" , "parameters" ));
151
+ "get" , "put" , "post" , "delete" , "head" , "patch" , "options" , "trace" , "servers" , "parameters" ));
155
152
protected static Set <String > OPERATION_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("tags" , "summary" , "description" ,
156
153
"externalDocs" , "operationId" , "parameters" , "requestBody" , "responses" , "callbacks" , "deprecated" ,
157
154
"security" ,
158
- "servers" ));
155
+ "servers" ));
159
156
protected static Set <String > PARAMETER_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "name" , "in" , "description"
160
157
, "required" , "deprecated" , "allowEmptyValue" , "style" , "explode" , "allowReserved" , "schema" , "example" ,
161
158
"examples"
162
- , "content" ));
159
+ , "content" ));
163
160
protected static Set <String > REQUEST_BODY_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "description" , "content"
164
- , "required" ));
161
+ , "required" ));
165
162
protected static Set <String > SECURITY_SCHEME_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "type" , "name" , "in"
166
- , "description" , "flows" , "scheme" , "bearerFormat" , "openIdConnectUrl" ));
167
- protected static Set <String > EXTERNAL_DOCS_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("description" , "url" ));
163
+ , "description" , "flows" , "scheme" , "bearerFormat" , "openIdConnectUrl" ));
164
+ protected static Set <String > EXTERNAL_DOCS_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("description" , "url" ));
168
165
protected static Set <String > COMPONENTS_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("schemas" , "responses" , "pathItems" ,
169
- "parameters" , "examples" , "requestBodies" , "headers" , "securitySchemes" , "links" , "callbacks" ));
170
- // TODO OAS3.1 - ensure all schema 2020/12 + OAS 3.1 vocabulary keys are added
166
+ "parameters" , "examples" , "requestBodies" , "headers" , "securitySchemes" , "links" , "callbacks" ));
167
+
171
168
protected static Set <String > SCHEMA_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "title" , "multipleOf" ,
172
169
"maximum" , "format" , "exclusiveMaximum" , "minimum" , "exclusiveMinimum" , "maxLength" , "minLength" ,
173
- "pattern" ,
174
- "maxItems " , "minItems " , "uniqueItems " , "maxProperties " , "minProperties " , "required " , "enum " , "type " ,
175
- "allOf " ,
176
- "oneOf " , "anyOf " , "not " , "items " , "properties " , "additionalProperties " , "patternProperties " , "description " ,
177
- "format" , "default" , "discriminator" , "readOnly" , "writeOnly" , "xml" , "externalDocs" , "example" , "deprecated " ,
178
- "const" , "examples" , "$id" , "$comment" , "if" , "then" , "else" , "unevaluatedProperties" , "prefixItems " ));
170
+ "pattern" , "maxItems" , "minItems" , "uniqueItems" , "maxProperties" , "minProperties" , "required" , "enum" , "type" ,
171
+ "allOf " , "oneOf " , "anyOf " , "not " , "items " , "properties " , "additionalProperties " , "description " ,
172
+ "default" , "discriminator" , "readOnly" , "writeOnly" , "xml" , "externalDocs" , "example" , "deprecated " ,
173
+ "const " , "examples " , "$id " , "$comment " , "if " , "then " , "else " , "unevaluatedProperties" , "prefixItems " ,
174
+ "contains" , "contentEncoding" , "contentMediaType" , "$anchor" , "$schema" , "contentSchema" , "propertyNames " ,
175
+ "dependentSchemas" , "dependentRequired" , "minContains" , "maxContains" , "patternProperties " ));
179
176
protected static Set <String > EXAMPLE_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "summary" , "description" ,
180
- "value" , "externalValue" ));
177
+ "value" , "externalValue" ));
181
178
protected static Set <String > HEADER_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "name" , "in" , "description" ,
182
179
"required" , "deprecated" , "allowEmptyValue" , "style" , "explode" , "allowReserved" , "schema" , "example" ,
183
180
"examples" ,
184
181
"content" ));
185
182
protected static Set <String > LINK_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("$ref" , "operationRef" , "operationId" ,
186
- "parameters" , "requestBody" , "description" , "server" ));
183
+ "parameters" , "requestBody" , "description" , "server" ));
187
184
protected static Set <String > MEDIATYPE_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("schema" , "example" , "examples" ,
188
- "encoding" ));
185
+ "encoding" ));
189
186
protected static Set <String > XML_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("name" , "namespace" , "prefix" ,
190
- "attribute" , "wrapped" ));
187
+ "attribute" , "wrapped" ));
191
188
protected static Set <String > OAUTHFLOW_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("authorizationUrl" , "tokenUrl" ,
192
- "refreshUrl" , "scopes" ));
189
+ "refreshUrl" , "scopes" ));
193
190
protected static Set <String > OAUTHFLOWS_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("implicit" , "password" ,
194
- "clientCredentials" , "authorizationCode" ));
191
+ "clientCredentials" , "authorizationCode" ));
195
192
protected static Set <String > ENCODING_KEYS_31 = new LinkedHashSet <>(Arrays .asList ("contentType" , "headers" , "style" ,
196
- "explode" , "allowReserved" ));
193
+ "explode" , "allowReserved" ));
197
194
198
195
protected static Map <String , Map <String , Set <String >>> KEYS = new LinkedHashMap <>();
199
196
0 commit comments