api-explorer
api-explorer copied to clipboard
Values for Accept headers should be configurable by API
Currently these values are hardcoded for json and xml.
This issue is a bit off the mark. The problem is actually this:
- There is an abstraction over the media types called "requestFormat", that is used for both the Accept header and the Content-Type header (when applicable);
- The request editor does not allow the selection of both headers independently;
- The lack of separation between the request and response media types will probably cause problems in the future specially when rendering responses.
My opinion is that we should try to remove the "requestFormat" abstraction in favor of "acceptMediaType" and "contentTypeMediaType" (the swagger spec contains a list of media types for each, one called "produces" and another "consumes").
Do you have any comments? We will probably need to move some things around on the UI side to accomplish this.
PS: Right now the "consumes" property is being used to populate the dropdown in the UI
@pmhsfelix @cguedes
This is a great ticket for discussion in one of our group meetings. Can we meet next week?
Ok, I'll arrange that meeting.