You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"error: Invalid content type string. [context: contentType=application/, location=/path1/GET/requestBody, recoverySuggestion=Must have 2 components separated by a slash '<type>/<subtype>'.]"
169
+
OpenAPI.Error(from:error).localizedDescription,
170
+
"Failed to satisfy: Content type is of form '<type>/<subtype>' at path: .paths['/path1'].get.requestBody.content['application/']"
169
171
)
170
172
}
171
173
}
@@ -210,15 +212,16 @@ final class Test_validateDoc: Test_Core {
210
212
],
211
213
components:.noComponents
212
214
)
215
+
letvalidator=Validator.blank.validating(validateContentTypes(){ contentType in
"error: Invalid content type string. [context: contentType=/plain, location=/path2/GET/responses, recoverySuggestion=Must have 2 components separated by a slash '<type>/<subtype>'.]"
223
+
OpenAPI.Error(from:error).localizedDescription,
224
+
"Failed to satisfy: Content type is of form '<type>/<subtype>' at path: .paths['/path2'].get.responses.200.content['/plain']"
222
225
)
223
226
}
224
227
}
@@ -251,15 +254,16 @@ final class Test_validateDoc: Test_Core {
"error: Invalid content type string. [context: contentType=image/, location=#/components/requestBodies/exampleRequestBody2, recoverySuggestion=Must have 2 components separated by a slash '<type>/<subtype>'.]"
265
+
OpenAPI.Error(from:error).localizedDescription,
266
+
"Failed to satisfy: Content type is of form '<type>/<subtype>' at path: .components.requestBodies.exampleRequestBody2.content['image/']"
263
267
)
264
268
}
265
269
}
@@ -298,15 +302,16 @@ final class Test_validateDoc: Test_Core {
298
302
),
299
303
])
300
304
)
305
+
letvalidator=Validator.blank.validating(validateContentTypes(){ contentType in
"error: Invalid content type string. [context: contentType=, location=#/components/responses/exampleRequestBody2, recoverySuggestion=Must have 2 components separated by a slash '<type>/<subtype>'.]"
313
+
OpenAPI.Error(from:error).localizedDescription,
314
+
"Failed to satisfy: Content type is of form '<type>/<subtype>' at path: .components.responses.exampleRequestBody2.content."
0 commit comments