valid-non-body-parameter-type
Overview
This rule belongs to the swagger-v2-standards-validation ruleset and states that:
Type of a non-body parameter specified using the type property in the Parameter Object must have one of the following possible values only: string, number, integer, boolean, array or file. All other values will be treated as invalid.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Type of non-body parameter is invalid. |
| Code | SWAGGER20STANDARDS_V099 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Parameters |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger2 swagger standards semantic validation type parameter body |
Suggested Fixes
- Type value is compared in a case-sensitive manner.
- Ensure that the type value matches exactly with the possible list of values and that there are no typos:
string,number,integer,boolean,arrayorfile. - Ensure that the value for parameter type is not null or empty.