Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Wrong content negotiation when Swagge4J fetches swagger descriptions #11

Open
izzyblues opened this issue Jul 28, 2015 · 0 comments
Open

Comments

@izzyblues
Copy link

Hello,
I am using Swagger4J to parse Swagger descriptions available on the iServe website (e.g., http://iserve.kmi.open.ac.uk/iserve/id/documents/18ee0842-f492-4f43-9073-ade556155526).
The website returns the swagger UI when "Accept: text/html" appears in the HTTP request header. Otherwise, it will return the JSON-based Swagger document when the header contains "Accept: application/json".
It looks like that Swagger4J is not able to fetch such JSON documents because in the HTTP request header contains "Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2".

I suppose that the header should contain "application/json" instead of "text/html". Isn't it?

Thank you very much for your help.
Cheers,

Luca

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant