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
.
Describe alternatives you've considered
n/d
Additional context
https://stackoverflow.com/questions/27260587/decimal-precision-in-json-schema
https://stackoverflow.com/questions/40886252/defining-a-json-schema-currency-type
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too