Parameter format is not applicable to the parameter's type

Description

The format you have specified for a parameter is not consistent with the type you have defined for the parameter. While this is acceptable, it may not be what you want.

For more details, see the OpenAPI Specification and JSON Schema Validation.

Example

The following is an example of how this issue could look in your API definition. The type of the parameter is integer, but the format is float which is not an integer format:

1parameters:
2  type: integer
3  name: total
4  in: query
5  format: float
6  description: Number of the objects in the array.
7

Remediation

Make sure that the formats of all parameters match the type of the parameters.

Numeric parameters type integer can have the format int32 or int64. Numeric parameters type number can have the format float or double.

1parameters:
2  type: integer
3  name: total
4  in: query
5  format: int32
6  description: Number of the objects in the array.
7

Copyright 42Crunch 2021