-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Type for money #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The semantics of |
For context here openapi-generator does this for python decimal.Decimal amounts with:
|
I could almost see a "number" format being useful, to specify strings that contain numeric data, but there's so many ways of representing a number, and some of them might not be suitable for a particular application. Also some numeric representations aren't practical in some languages. For example, one could start out defining a number format as "any string that can be converted to a number in my language" -- so for perl, the easy way of implementing that is with tldr: formats like this are best defined locally to an application using a definition, so it can be tailored to the exact needs of that application, framework and language. |
For money params we need special type, in Python, for example, it named decimal, PostgreSQL has numeric type.
The text was updated successfully, but these errors were encountered: