Skip to main content

valid-parameter-location

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

Location of a parameter specified using the in property in the Parameter Object must have one of the following possible values only: query, header, path or cookie. All other values will be treated as invalid.

PropertyValue
EnabledYes
Maximum SeverityError
MessageParameter location is invalid.
CodeOPENAPI3STANDARDS_V079
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation location parameter

Suggested Fixes

  • Location value is compared in a case-sensitive manner.
  • Ensure that the location value matches exactly with the possible list of values and that there are no typos: query, header, path or cookie.
  • Ensure that the value for parameter location is not null or empty.

For More Information