Skip to content

BUG: If a float-specified field holds an integer number, the resultin…#1421

Open
wolfgang-noichl wants to merge 1 commit intoopenapi-generators:mainfrom
wolfgang-noichl:bug/json_float_int
Open

BUG: If a float-specified field holds an integer number, the resultin…#1421
wolfgang-noichl wants to merge 1 commit intoopenapi-generators:mainfrom
wolfgang-noichl:bug/json_float_int

Conversation

@wolfgang-noichl
Copy link
Copy Markdown

…g object is int instead of float.

If a float field is specified, and the float is e.g. 5.0, representing it as "5" is valid json (because it does not destinguish between "integer" floats and ints). Right now, this results in an int object in python, even though this violates the schema.

This is kind of a quick-and-dirty patch to the issue, but it does solve the problem at hand.

Ideas how to solve the problem in a cleaner way are much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant