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

PHP boolean parameter in query string incorrectly converted to string #10939

Open
pierrre opened this issue Mar 8, 2021 · 1 comment
Open

Comments

@pierrre
Copy link

pierrre commented Mar 8, 2021

Description

The boolean query string parameters are incorrectly converted to string.
If the value is true it's converted to "1", and if it's false it's converted to "".

The PHP generated code is calling https://github.com/guzzle/psr7/blob/ff1b0eae41c6bc0b03ef657f29d8a9eea7ee75eb/src/Query.php#L71
But this code has a bug, it's incorrectly converting boolean values to string.
See guzzle/psr7#264

Suggest a fix/enhancement

swagger-codegen should probably encode the query string by itself.
Currently the generated code is broken.
And Guzzle/psr7 doesn't seem to want to fix this bug soon.

@Mahima-eng
Copy link

Any update on this please?

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