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'