-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Make boolean quirk an enum #45
Conversation
Conflicting files |
Signed-off-by: jld3103 <[email protected]>
9efa1ef
to
299fea3
Compare
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So at least bools only allow int with enum 0 and 1 now, so better than before.
But shouldn't it be listed as bool?
The problem is that query parameters are always interpreted as true unless the value is 0. So we need to map them as integers :/ |
Added tests in #59 |
But not when you POST a JSON body, but it will work in both cases anyway, so okay |
Yes with a json post body boolean works fine, but not with the query parameters as we use them here. |
For query parameters we have to convert booleans into integers as they are only accepted that way. This sets the
enum
field on the returned integer schema to indicate that these are the only possible values.Can be tested in the server.