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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Content type of the HTTP request defined in consumes list for form parameter is invalid. |
Code | SWAGGER20STANDARDS_V105 |
Type | Validation |
Rule System | Semantic |
Broad Category | Parameters |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger2 swagger standards semantic validation content type request form parameter consumes |
Suggested Fixes
- Ensure that the
consumes
property of the operation only contains eitherapplication/x-www-form-urlencoded
,multipart/form-data
or both only. - The content types are compared in a case-sensitive manner.