File parameter used in an operation where the ‘consumes’ property does not allow it


The parameter file is used in an operation where the consumes property does not allow it. This can happen if you have not defined the consumes property as:

  • multipart/form-data
  • application/x-www-form-urlencoded

This applies only to OpenAPI Specification (OAS) v2. For more details, see the OAS.


Make sure that the consumes property allows using the the file parameter, or remove the parameter.

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy