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

[REQ] allow to pass a str to the Python aiohttp client #18972

Closed
ziodave opened this issue Jun 19, 2024 · 1 comment
Closed

[REQ] allow to pass a str to the Python aiohttp client #18972

ziodave opened this issue Jun 19, 2024 · 1 comment

Comments

@ziodave
Copy link
Contributor

ziodave commented Jun 19, 2024

Is your feature request related to a problem? Please describe.

At the moment, it is not possible but to use bytes to pass raw data to the client

https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache#L183

This conflicts with definitions that are string and represented as StrictStr in model.

Describe the solution you'd like

Same solution as in the sample here:

elif isinstance(body, str) or isinstance(body, bytes):

ziodave added a commit to ziodave/openapi-generator that referenced this issue Jun 19, 2024
Add support for `str`
wing328 added a commit that referenced this issue Jun 23, 2024
* see #18972

Add support for `str`

* update python samples

---------

Co-authored-by: David Riccitelli <david@wordlift.io>
@wing328
Copy link
Member

wing328 commented Jun 26, 2024

closed via #18985

@wing328 wing328 closed this as completed Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants