You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Sometimes there is a need to have some way of representing money. JSON Schema offers multipleOfPrecision which could be used to limit possible values.
Describe the solution you'd like
I think if JSON Schema contains multipleOfPrecision, then such number should be converted to ConstrainedDecimal offered by Pydantic. Currently datamodel-code-generator ignores multipleOfPrecision.
Is your feature request related to a problem? Please describe.
Sometimes there is a need to have some way of representing money. JSON Schema offers
multipleOfPrecision
which could be used to limit possible values.Describe the solution you'd like
I think if JSON Schema contains
multipleOfPrecision
, then such number should be converted toConstrainedDecimal
offered by Pydantic. Currently datamodel-code-generator ignoresmultipleOfPrecision
.Describe alternatives you've considered
n/d
Additional context
https://stackoverflow.com/questions/27260587/decimal-precision-in-json-schema
https://stackoverflow.com/questions/54961638/what-are-some-ways-to-restrict-the-decimal-places-in-json-schema
https://stackoverflow.com/questions/40886252/defining-a-json-schema-currency-type
The text was updated successfully, but these errors were encountered: