api-explorer icon indicating copy to clipboard operation
api-explorer copied to clipboard

Values for Accept headers should be configurable by API

Open danielbcorreia opened this issue 8 years ago • 4 comments

Currently these values are hardcoded for json and xml.

danielbcorreia avatar Jun 15 '16 13:06 danielbcorreia

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

danielbcorreia avatar Jul 27 '16 10:07 danielbcorreia

This is a great ticket for discussion in one of our group meetings. Can we meet next week?

cguedes avatar Jul 27 '16 10:07 cguedes

Ok, I'll arrange that meeting.

danielbcorreia avatar Jul 27 '16 11:07 danielbcorreia

image

danielbcorreia avatar Aug 02 '16 15:08 danielbcorreia