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

Cannot use boolean query parameter #380

Open
frankandrobot opened this issue Jul 3, 2018 · 1 comment
Open

Cannot use boolean query parameter #380

frankandrobot opened this issue Jul 3, 2018 · 1 comment

Comments

@frankandrobot
Copy link

An endpoint is programmed to accept a boolean as an query parameter:

      - in: query
        name: asc_order
        type: boolean
        default: true

Unfortunately, under the hood, we're using a JSON parser to parse query parameters. That means that because bravado sends "F" and "T" that I am unable to set this parameter; otherwise I get a 400:

HTTPBadRequest: 400 Bad Request: APIError(code=25, error=u"The parameter asc_order cannot be deserialized: invalid character 'F' looking for beginning of value", payload=None)

How do I send a true/false instead?

@macisamuele
Copy link
Collaborator

@frankandrobot thanks for the report

This seems related to Yelp/bravado-core#281

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