valid-location-for-file-type-parameter
Overview
This rule belongs to the swagger-v2-standards-validation ruleset and states that:
For file type parameters, the parameter's location must be formData. Form is the only parameter type that can be used to send files, thus supporting the file type.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Invalid parameter location for file type parameter found. |
| Code | SWAGGER20STANDARDS_V107 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Parameters |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger2 swagger standards semantic validation location parameter type file |
Suggested Fixes
- Ensure that the
inproperty of the parameter contains the valueformData. - Location value is compared in a case-sensitive manner.
- Ensure that the value for parameter location is not null or empty.