Skip to content
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

query param in enum wrongly converted to boolean #104

Open
martinellog opened this issue Mar 23, 2016 · 1 comment
Open

query param in enum wrongly converted to boolean #104

martinellog opened this issue Mar 23, 2016 · 1 comment

Comments

@martinellog
Copy link

Given the following swagger spec of a parameter:
name: whatever
in: query
type: string
enum

  • true

and the request contains a p=true in the query, the validation fails saying that true is not available as an option in the enum. this is because the true in the enum is converted to boolean at some point of the execution in the library. This happens if i put True capitalized in the enum options. If I put type: boolean in the spec, then still the library says that p is not valid, because is of type stsring and should be boolean.

@pipermerriam
Copy link
Owner

I don't have the bandwidth to look into this myself at the moment. I think that the correct place to start investigating is in flex.validation.parameters.type_cast_parameter which is responsible for the appropriate type casting of parameters.

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

No branches or pull requests

2 participants