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: demoversion: 1.0.0paths:
/:
post:
consumes:
- application/json
- multipart/form-dataparameters:
- name: payloadin: bodyschema: {}
- name: attachmentin: formDatatype: stringresponses:
200:
description: asdswagger: '2.0'
An API call may be able to consume multiple formats. This format could be for example
multipart/form-dataorapplication/json.However, following the spec, these fields are mutually exclusive. The following is considered invalid by Swagger editor: