required-non-body-parameter-type
Overview
This rule belongs to the swagger-v2-standards-validation ruleset and states that:
The Parameter Object must specify a type for the non-body parameters using the type property. The type identifies the data type of the parameter and must not be null or empty. Possible values are string, number, integer, boolean, array or file. If type information is missing, type string will be assumed by default automatically during import/transformations in APIMatic.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required type property for non-body parameters in Parameter Object is missing. |
| Code | SWAGGER20STANDARDS_V098 |
| 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
- Add missing
typeproperty in the Parameter object. - Make sure that the
typeproperty is not null or empty. - Make sure that the value of the
typeis one of the following values:string,number,integer,boolean,arrayorfile. The values are case-sensitive.