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
21.29k stars 6.44k forks source link

[REQ] Support for with_aws_v4_signature in python Generator #10226

Open lisuizhe opened 3 years ago

lisuizhe commented 3 years ago

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

Python generator lacks support for signing apis with AWS v4 generator.

Describe the solution you'd like

This generator lacks with_aws_v4_signature which indicates whether to include AWS v4 signature support. This feature is available in Go generator: https://openapi-generator.tech/docs/generators/go/

I have a looked into how to use urllib3 with aws signature v4 support, but cannot found any existed library to support this... may require referring aws sample code to modify header when making request by urllib3 to support

Describe alternatives you've considered

Maybe not good, but if with_aws_v4_signature is true, we can use awscurl instead of [urllib3.PoolManager](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/python/rest.mustache] to make to request, and adapt the response to urllib3 response

Additional context

Here is the PR to add AWS V4 signature support to the Go client generator: https://github.com/OpenAPITools/openapi-generator/pull/7326/files.

ChenAndrew commented 1 year ago

+1 this would be a helpful feature

Ykid commented 1 year ago

:+1!