-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
For the Swagger below, the produces is XML, not JSON. (We don't have a schema because this is an external spec, application/gml+xml )
The POST operation does not show the Response Content Type drop down, so the user cannot select the media type. (and if produces only contains one, it should still show that type, for documentation purposes, as is done if there is only one JSON media type.)
Swagger UI is 2.2.3
Swagger document:
{
"swagger": "2.0",
"info": {
"version": "1",
"title": "No Response Content Type when produces XML",
"description": "The UI omits the response content type drop down for non-JSON"
},
"schemes": [ "http" ],
"host": "www.example.com",
"basePath": "/producesXml",
"paths": {
"/service": {
"post": {
"summary": "Create a resource",
"produces": [
"application/gml+xml",
"application/xml"
],
"consumes": [
"application/json"
],
"parameters": [
{
"name": "regionId",
"in": "query",
"description": "The GML region ID",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK, application/gml+xml resonse returned",
"type" : "string"
}
}
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels