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

Body parameter should be able to coexist with other parameters #775

Closed
remcohaszing opened this issue Sep 1, 2016 · 2 comments
Closed

Comments

@remcohaszing
Copy link

An API call may be able to consume multiple formats. This format could be for example multipart/form-data or application/json.

However, following the spec, these fields are mutually exclusive. The following is considered invalid by Swagger editor:

info:
  title: demo
  version: 1.0.0
paths:
  /:
    post:
      consumes:
        - application/json
        - multipart/form-data
      parameters:
        - name: payload
          in: body
          schema: {}
        - name: attachment
          in: formData
          type: string
      responses:
        200:
          description: asd
swagger: '2.0'
@darrelmiller
Copy link
Member

V3.0 of the spec introduces a new requestBody object and this PR #761 changes the way media types are mapped to request/response bodies.

@darrelmiller
Copy link
Member

@remcohaszing Can I close this? I do believe OpenAPI 3.0 will address this requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants