required-parameter-location
Overview
This rule belongs to the swagger-v2-standards-validation ruleset and states that:
The Parameter Object must specify a location for the parameter using the in property. The location identifies where the parameter needs to be sent in the request and must not be null or empty. Possible values are 'query', 'header', 'path', 'formData' or 'body'. If parameter location is not set, query will be assumed by default automatically during import/transformations in APIMatic.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required in property in Parameter Object is missing. |
| Code | SWAGGER20STANDARDS_V096 |
| 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 |
Suggested Fixes
- Add missing
inproperty in the Parameter object. - Make sure that the
inproperty is not null or empty. - Make sure that the value of the
inproperty is one of the following values: 'query', 'header', 'path', 'formData' or 'body'. The values are case-sensitive.