Open DDtKey opened 9 months ago
As per the JSON Schema spec format is an open-ended keyword, so you can define your own values.
Hm, right, that makes sense in terms of OAI spec. Thanks for the reference
So I guess format
can be preserved, but what do you think of producing minimum
+ maximum
(& exclusiveMinimum
)? It should be pretty straightforward
The issue is that different OAI client-generators not aware of custom defined formats, they usually rely on min
+ max
bounds (to choose more appropriate type).
It's ofc possible to extend rust-specific generators to support these types, but it's still depends a lot on particular library used to generate OAI spec. So usually generators use more common approaches
Expected Behavior
Should produce openapi-schema with
minimum
&maximum
instead ofuint16/32/64
.It's not unified format and usually controlled by
minimum
/maximum
&exclusiveMinimum
Exists only one unsigned (unified) definition: uint8Actual Behavior
Currently it produces