Skip to main content

valid-request-content-type-for-form-parameters

Overview

This rule belongs to the swagger-v2-standards-validation ruleset and states that:

Content type of the request for form parameters defined in consumes list can either be application/x-www-form-urlencoded, multipart/form-data or both only.

PropertyValue
EnabledYes
Maximum SeverityError
MessageContent type of the HTTP request defined in consumes list for form parameter is invalid.
CodeSWAGGER20STANDARDS_V105
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation content type request form parameter consumes

Suggested Fixes

  • Ensure that the consumes property of the operation only contains either application/x-www-form-urlencoded, multipart/form-data or both only.
  • The content types are compared in a case-sensitive manner.

For More Information