Swagger-ui: Could not click on the item in the Parameter Content Type box in 3.13.2 -> 3.13.6

Created on 27 Apr 2018  路  3Comments  路  Source: swagger-api/swagger-ui

| Q | A
| ------------------------------- | -------
| Bug or feature request? |
| Which Swagger/OpenAPI version? |
| Which Swagger-UI version? |
| How did you install Swagger-UI? |
| Which browser & version? |
| Which operating system? |

Demonstration API definition


When you reference to a json file or yaml file in your main json file or yaml file.
and the reference json file you define a consumes which contains more than one item.
Then you could not chose the other item in the parameter content type

put a $ref in your main.json

 "/v1/book": {
        "$ref": "book.json#/buy"
    },

and in book.json:

{
"post": {
"description": "Book",
"operationId": "buy",
"summary": "Buy a book",
"tags": [
"Book"
],
"consumes": [
"application/json",
"application/xml"
],
"parameters": [
{
"name": "requestBody",
"in": "body",
"description": "Buy a Book",
"required": true
}
]
}
}

Expected Behavior


image

User could click on the application/xml successfully.

Current Behavior


User couldn't click on the application/xml. After click on the application/xml the GUI still use application/json.
image

Possible Solution


I thought the bug was happened after the fix for path item $ref rendering (via #4381) in 3.13.2

try-it-out lock-bot bug

All 3 comments

Bug confirmed!

I just finished a fix, which will be released today. Sorry for the trouble, and thanks for reporting!

A Massive thank you shockey for supporting this problem very quickly. Thank you very much.

Locking due to inactivity.

This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content.

If you think you're experiencing something similar to what you've found here: please open a new issue, follow the template, and reference this issue in your report.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sgyang picture sgyang  路  4Comments

ilnurshax picture ilnurshax  路  3Comments

fehguy picture fehguy  路  3Comments

ankon picture ankon  路  4Comments

holyketzer picture holyketzer  路  4Comments