OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
20.54k stars 6.27k forks source link

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

Closed ziodave closed 5 days ago

ziodave commented 1 week ago

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: https://github.com/OpenAPITools/openapi-generator/blob/a4d43a83769fd71c0a2db79e8dc04af9699bd1fc/samples/client/echo_api/python/openapi_client/rest.py#L220

wing328 commented 5 days ago

closed via https://github.com/OpenAPITools/openapi-generator/pull/18985