Skip to main content

double-schema-format-with-number-type

Overview

This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:

The double format is only applicable to schemas with the type set to number. It seems that the double format has been used with an incompatible schema type.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageThe format double is not applicable to the given schema type.
CodeOPENAPI3APIMATIC_L669
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi apimatic semantic linting double schema type format number

Suggested Fixes

  • Ensure that the schema type is set to number for compatibility with the double format.
  • If the schema represents a different data type, consider using a compatible format or removing the double format.
  • Ensure that the format used aligns with the schema's type and represents the desired data representation (e.g., float for smaller number).

For More Information