schemars
schemars copied to clipboard
format `double` & `int64` & `int` not compatible with ajv
trafficstars
I use schemars to generate schema but the generated schema cannot be validated by ajv, https://github.com/ajv-validator/ajv
if I remove all format: int64, format:int, format:double then it's ok
That sounds like a bug in ajv:
https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.7.2.3
An implementation MUST NOT fail validation or cease processing due to an unknown format attribute.
I had the same problem with "format": uint with Ruff and it was likewise solved by removing it.