Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageRequired type property for non-body parameters in Parameter Object is missing.
CodeSWAGGER20STANDARDS_V098
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation type parameter body

Suggested Fixes

  • Add missing type property in the Parameter object.
  • Make sure that the type property is not null or empty.
  • Make sure that the value of the type is one of the following values: string, number, integer, boolean, array or file. The values are case-sensitive.

For More Information