Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curl output does not reflect choosen response content type #1767

Closed
zuphilip opened this issue Nov 19, 2015 · 3 comments
Closed

Curl output does not reflect choosen response content type #1767

zuphilip opened this issue Nov 19, 2015 · 3 comments

Comments

@zuphilip
Copy link

As part of the output of an action in the swagger-ui there is also a line for curl with an accept header. But this accept header is always application/json regardless of which options one has choosen for the response content type.

For example in your demo the GET pet/findByStatus, choose application/xml as Response Content Type and available as status. Then the shown Curl prompt is

curl -X GET --header "Accept: application/json" "http://petstore.swagger.io/v2/pet/findByStatus?status=available"

See also

swagger-curl

The same seems to be the case for the Request Headers if it is shown. We encountered the error first here infolis/infolis-web#21

@webron
Copy link
Contributor

webron commented Nov 19, 2015

Which version of swagger-ui do you use?

@webron
Copy link
Contributor

webron commented Nov 19, 2015

Nevermind. Now I see what you mean. It should have been resolved already, probably a regression.
swagger-api/swagger-js#504

@zuphilip
Copy link
Author

Okay. I am looking forward for a fix.

@fehguy fehguy closed this as completed in 8276fbf Nov 28, 2015
Jonahss pushed a commit to eaze/swagger-ui that referenced this issue Aug 12, 2016
vincent-zurczak pushed a commit to roboconf/swagger-ui that referenced this issue Aug 19, 2016
JuanSW18 pushed a commit to Digital-Paw/digital-paw-swagger-ui that referenced this issue Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants