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

Postman does not handle multiple content types headers from open api specs #126

Open
harshpat opened this issue Nov 7, 2019 · 2 comments
Labels
feature New feature request, accepted for probable development request-body

Comments

@harshpat
Copy link

harshpat commented Nov 7, 2019

Swagger open api specs has multiple ContentType for same URL.
Should postman duplicate URLs per content-types, instead of just showing one content-type in headers which is at top ?

Capture

Capture2

@abhijitkane
Copy link
Member

@harshpat I'd agree using the first one isn't ideal. What's the use-case of different types of request payloads for different content-types? How different would the different schemas be?

We could use JSON>XML>Text as the priority order while determining what request body to use for the main request.

We use Postman's examples to define the various responses that this endpoint can generate. If the assumption is that content type C1 in the request results in content type C1 in the response, we can generate the correct example requests as well.

@abhijitkane abhijitkane added the feature New feature request, accepted for probable development label Dec 5, 2019
@jpoehnelt
Copy link

There is also the case where there are multiple examples for a specific content type. Current behavior grabs the first example, bar.

content:
    "application/json":
      examples:
        bar: 
          value:
            $ref: ./examples/bar.json
        foo: 
          value:
            $ref: ./examples/foo.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request, accepted for probable development request-body
Projects
None yet
Development

No branches or pull requests

4 participants