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

Allow True/False for query parameters #116

Merged
merged 4 commits into from
Jan 5, 2016

Conversation

cyprien-g
Copy link
Contributor

I think 'True' / 'False' should be allowed for query parameters. And that would also make swagger client like Bravado compatible with connexion (as it send query parameters with a capital letter).

@hjacobs
Copy link
Contributor

hjacobs commented Dec 28, 2015

@cyprien-g thanks for the pull request 😄

Just an idea: if we relax the boolean parsing anyway, what about using lower() to also allow all uppercase values?

@cyprien-g
Copy link
Contributor Author

That's a good idea, I've just made the change.

@@ -131,9 +131,9 @@ def boolean(s):
>>> boolean('false')
False
'''
if s == 'true':
if s.lower() == 'true':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO we should allow passing None values, i.e. I would check for None to make sure we always get proper ValueError (and not AttributeError).

@cyprien-g cyprien-g force-pushed the allow-True-False-boolean-query branch from d14616b to 41df524 Compare January 4, 2016 09:30
@flavianh
Copy link

flavianh commented Jan 4, 2016

When do you think this will be released @hjacobs ?

hjacobs added a commit that referenced this pull request Jan 5, 2016
@hjacobs hjacobs merged commit 894c235 into spec-first:master Jan 5, 2016
@hjacobs
Copy link
Contributor

hjacobs commented Jan 5, 2016

@traxair I'm on it, but I have to get our CD server (which does the release) working again first 😏

@flavianh
Copy link

flavianh commented Jan 5, 2016

Cool! Looking forward to it 😉

@hjacobs
Copy link
Contributor

hjacobs commented Jan 5, 2016

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.

3 participants