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

Wrong content negotiation when Swagge4J fetches swagger descriptions #11

@izzyblues

Description

@izzyblues

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions