swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Response Reference Descriptions do not show

Open jrymal opened this issue 11 years ago • 2 comments

Looking at the spec (https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#responsesObject), I think the Response Definition Descriptions ought to show in the UI.

The UI just shows the 400, not the actual description pulled from the reference.

{
  "swagger" : "2.0",
  "info" : {
    "version" : "1.0.0",
    "title" : "Test"
  },
  "host" : "127.0.0.1:9066",
  "basePath" : "/ws/rest",
  "schemes" : [
    "http"
  ],
  "paths" : {
    "/GetCityForecastByZIP" : {
      "post" : {
        "summary" : "GetCityForecastByZIP",
        "consumes" : [
          "application/xml"
        ],
        "produces" : [
          "application/xml"
        ],
        "parameters" : [
          {
            "in" : "body",
            "name" : "GetCityForecastByZIP - Request",
            "required" : true,
            "schema" : {
              "$ref" : "#/definitions/GetCityForecastByZIP"
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "Success",
            "schema" : {
              "$ref" : "#/definitions/GetCityForecastByZIP"
            }
          },
          "400" : {
            "$ref" : "#/responses/400"
          }
        }
      }
    }
  },  
  "definitions" : {
    "GetCityForcastByZIP" : {
      "type" : "object",
      "xml" : {
        "namespace" : "http://ws.cdyne.com/WeatherWS/",
        "prefix" : "ns1"
      },
      "properties" : {
        "ZIP" : {
          "type" : "string",
          "xml" : {
            "namespace" : "http://ws.cdyne.com/WeatherWS/",
            "prefix" : "ns1"
          }
        }
      }
    }
  },
  "responses" : {
    "400" : {
      "description" : "Bad Request - There are miscellaneous errors with the request, for example, mismatches between the request and what is allowed for the operation."
    }
  }
}

jrymal avatar Mar 27 '15 18:03 jrymal

Seems to be fixed. Cannot reproduce on the develop_2.0 branch

issue-1090

iushankin avatar Apr 23 '15 14:04 iushankin

Looks like it is fixed. Thanks!

jrymal avatar Apr 23 '15 14:04 jrymal