title: Does response status code make sense for multiple media types for error status codes as per OpenAPI 3 (Swagger) spec
body: <p>If we follow the OAS3 spec for Response <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#responses-object" rel="nofollow noreferrer">here</a> we can see that each response status code can have multiple media types and each media type in turn has a schema particular to it.</p>
  <p><strong>UseCase :</strong> For example oas3 example below, we can see 200 has a binary stream response but 400 has 3 media-types:application/json, application/xml, text/plain.</p>
  <p>So is the client expected to request accept-type header with all the media-types mentioned below. How can we have specific media-type for 400 response code, or basically how we can convey to the REST Service to respond with media type as application/xml when its a 400 bad request and if 200 is returning a binary stream.</p>
  <p>Does this OAS3 response multiple media-type make sense for Client/Server Errors. If yes then whats the accept-type set for expecting, say &quot;application/xml&quot; for 400 bad request.</p>
  <p>Please refer the below swagger UI snap. Where we see a drop-down for the media-types for error code as well. But when we try out executing the rest operations, the accept header is only populated as per the 200 status code's media-type</p>
  <p><a href="https://i.stack.imgur.com/aZKXO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aZKXO.png" alt="enter image description here" /></a></p>
  <pre><code>openapi: 3.0.0
  info:
    version: &quot;1.0&quot;
    title: Resource
    description: Resource service
  paths:
    /resource:
      get:
        summary: getResource
        description: getResource
        operationId: get-resource
        responses:
          &quot;200&quot;:
            description: a binary document to be returned
            content:
              application/octet-stream:
                schema:
                  type: string
                  format: binary
          &quot;400&quot;:
            description: Bad Request
            content:
              application/json:
                schema:
                  $ref: &quot;#/components/schemas/Error400Element&quot;
              application/xml:
                schema:
                  $ref: &quot;#/components/schemas/Error400Element&quot;
              text/plain:
                schema:
                  $ref: &quot;#/components/schemas/Error400Element&quot;
          &quot;500&quot;:
            description: Internal Server Error
            content:
              application/json:
                schema:
                  $ref: &quot;#/components/schemas/Error500Element&quot;
              application/xml:
                schema:
                  $ref: &quot;#/components/schemas/Error500Element&quot;
              text/plain:
                schema:
                  $ref: &quot;#/components/schemas/Error500Element&quot;
  servers:
    - url: http://localhost:8088/
  components:
    schemas:
      Error400Element:
        type: object
        required:
          - name
        properties:
          name:
            type: string
          number:
            type: integer
      Error500Element:
        type: object
        properties:
          number:
            type: integer
          flag:
            type: boolean
  </code></pre>
  <p><strong>EDIT :</strong> modified the OAS3 spec and the SwaggerUI</p>