Open kcsuraj opened 4 years ago
@kcsuraj may I know if you've time to contribute the enhancement? We can show you some good starting points to start with.
@wing328 Sure. I can give it a try.
@wing328 Can you post those starting points?
Here is the PR to add AWS V4 signature support to the Go client generator: https://github.com/OpenAPITools/openapi-generator/pull/7326/files.
Following up on this:
I see two paths forward here, we could
a) utilize the https://github.com/jamesmbourne/aws4-axios and implement as an interceptor, as seen in @jarruda's commit b) Implement using system libraries, similar to https://github.com/mhart/aws4, implementing it similar to the existing auth methods which are added here: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache#L30 https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache#L5
Do we have a preference for this?
I'm inclined for option b, as it avoids a third-party dependency, but may require additional maintenance in the future if sigv4 were to change
Hi there, I was wondering if any of you had found a workaround to sign requests generated by the typescript-axios
generator without editing the generated files?
I've been trying to wrap my head around this, but so far couldn't make it work, I find myself re-implementing the client myself and using the generated client only for types, which is a shame.
Hey guys, I managed to create a PR to support this using https://github.com/jamesmbourne/aws4-axios as this is the library I personally am familiar with, have a look at it, would appreciate a review there https://github.com/OpenAPITools/openapi-generator/pull/18215
TypeScript generator lacks support for signing apis with AWS v4 generator.
This generator lacks
withAWSV4Signature
which indicates whether to include AWS v4 signature support. This feature is available in Go generator: https://openapi-generator.tech/docs/generators/go/So, it would be great to have support for this feature in TypeScript Axios generator as well. https://openapi-generator.tech/docs/generators/typescript-axios/