Skip to content

OAS 3.0 "try it out" always uses "Accept: application/json" instead of the selected response type #3654

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

Closed
hkosova opened this issue Sep 11, 2017 · 2 comments

Comments

@hkosova
Copy link
Contributor

hkosova commented Sep 11, 2017

Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? 3.0.0
Which Swagger-UI version? 3.2.0
How did you install Swagger-UI? Using the online editor http://editor.swagger.io
Which browser & version? Chrome 60
Which operating system? Windows 7

Demonstration API definition

openapi: 3.0.0
info:
  version: 1.0.0
  title: test
servers:
  - url: http://httpbin.org

paths:
  /get:
    get:
      responses:
        '200':
          description: OK
          content:
            application/xml: {}
            text/plain: {}

Steps to reproduce:

  • Expand the operation and click "Try it out".
  • Under "Responses", select "application/xml" or "text/plain".
  • Click "Execute".

Expected Behavior

Request is sent with Accept: application/xml or Accept: text/plain - depending on which response type was selected.

Current Behavior

Request is sent with Accept: application/json.

@webron
Copy link
Contributor

webron commented Sep 11, 2017

Hmm, @shockey?

@shockey
Copy link
Contributor

shockey commented Sep 16, 2017

Fix should be live..... shortly 😄

Thanks @hkosova!

@lock lock bot locked and limited conversation to collaborators Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants