Q&A (please complete the following information)
- OS: Linux
- Browser: Chromium
- Version: 139
- Method of installation: Embedded in Quarkus
- Swagger-UI version: 5.20.8
- Swagger/OpenAPI version: OpenAPI 3.1.0
Content & configuration
Example Swagger/OpenAPI definition:
{
"openapi" : "3.1.0",
"paths" : {
"/hello" : {
"get" : {
"responses" : {
"200" : {
"description" : "The hello message",
"content" : {
"text/plain" : {
"schema" : {
"type" : "string"
}
}
},
"x-tenant" : "acme"
},
"500" : {
"description" : "Internal server error",
"x-tenant" : "acme"
},
"x-tenant" : "acme"
},
"x-tenant" : "acme",
"summary" : "Hello",
"tags" : [ "Example Resource" ]
}
}
},
"info" : {
"title" : "prout-quarkus API",
"version" : "1.0-SNAPSHOT"
}
}
Describe the bug you're encountering
The presence of extensions field in Responses object replace the rendering of responses by the following error message : 😱 Could not render responses_Responses, see the console.
OpenAPI specification allow usage of extensions in Responses object (cf. OpenAPI documentation).
I've opened an issue in smallrye-open-api repository that describe this bug in a more Java way (cf: smallrye/smallrye-open-api#2349).
To reproduce...
Steps to reproduce the behavior:
- Copy the previous OpenAPI specification into a SwaggerUI editor
- Open the operation
Expected behavior
SwaggerUI must render or ignore extensions in Responses object.
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
{ "openapi" : "3.1.0", "paths" : { "/hello" : { "get" : { "responses" : { "200" : { "description" : "The hello message", "content" : { "text/plain" : { "schema" : { "type" : "string" } } }, "x-tenant" : "acme" }, "500" : { "description" : "Internal server error", "x-tenant" : "acme" }, "x-tenant" : "acme" }, "x-tenant" : "acme", "summary" : "Hello", "tags" : [ "Example Resource" ] } } }, "info" : { "title" : "prout-quarkus API", "version" : "1.0-SNAPSHOT" } }Describe the bug you're encountering
The presence of extensions field in
Responsesobject replace the rendering of responses by the following error message :😱 Could not render responses_Responses, see the console.OpenAPI specification allow usage of extensions in Responses object (cf. OpenAPI documentation).
I've opened an issue in
smallrye-open-apirepository that describe this bug in a more Java way (cf: smallrye/smallrye-open-api#2349).To reproduce...
Steps to reproduce the behavior:
Expected behavior
SwaggerUI must render or ignore extensions in Responses object.