You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ehsanonline: Despite the fact that you find a workaround for yourself, I would like to explain why you got the validation error.
The reason is not in Quart-OpenAPI itself, but at jsonschema. JSONSchema (which is used for validtion) has 2 keywords for describing several supported cases:
anyOf validates that any (at least one) schema defined by this keyword's value should pass.
oneOf validates that only one schema defined by this keyword's value should pass.
123 is a valid over both your schemas (it can be a string and an integer), so validation with oneOf fails...
I was testing this example code:
Then send this request:
I got this respond:
But I was expecting
{'message':'OK'}
respond.It works with float value for
baz
key.Funny note: at respond in
msg
it says 'is valid' !The text was updated successfully, but these errors were encountered: