-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Type: number, Format: float becomes a double in C# #1122
Comments
Any news? |
The problem is that float is not handled here: The format is defined however: https://github.com/RSuter/NJsonSchema/blob/master/src/NJsonSchema/JsonFormatStrings.cs |
BTW: Double and float seem to be not defined format types for JSON Schema: https://json-schema.org/latest/json-schema-validation.html#rfc.section.7.3 |
There's another problem with float and double and its about this types scopes - they can be Infinity or NaN, but generated json schema points them as "number" only. |
According to https://swagger.io/docs/specification/data-models/data-types/
There can be floats as well as doubles, however for the C# generator it seems like both float and double will end up being a double.
The text was updated successfully, but these errors were encountered: