Schema format is not applicable to the schema's type

Description

The format you have specified for a schema is not consistent with the type you have defined for the schema. 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 schema is integer, but the format is float which is not an integer format:

1User:
2  type: object
3  properties:
4    id:
5      type: integer
6      format: float
7

Remediation

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

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

1User:
2  type: object
3  properties:
4    id:
5      type: integer
6      format: int32
7

Copyright 42Crunch 2021