Skip to content

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

@remcohaszing

Description

@remcohaszing

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions