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

Considering using an OpenAPI generated client internally #105

Open
stormshield-gt opened this issue Oct 15, 2024 · 2 comments
Open

Considering using an OpenAPI generated client internally #105

stormshield-gt opened this issue Oct 15, 2024 · 2 comments

Comments

@stormshield-gt
Copy link
Collaborator

The new official vault C# client use a generated client based on the OpenAPI specs.

I think it might be a good option for us as well, both for ease of maintenance and correctness. The Rust generator is using reqwest as we already do.
We could only use it internally, and keep exposing the same public API so it won't break any user code.

With that and #80, I think we could get rid of most of our unmaintained dependencies

@Zoruk
Copy link

Zoruk commented Oct 16, 2024

It's a great Idea but I wanted to do some tests regarding this and the generated openapi.json is missing a lot of responses objects which render the generated code unusable for some endpoints.

The issue has been there for a while now I don't see any fix soon:
hashicorp/vault#11746
hashicorp/vault#27269

@stormshield-gt
Copy link
Collaborator Author

Thanks a lot for digging this up! That's quite sad that they don't want to fix this. Maybe there is still some value to use the client generated request types with our handcrafted response types?

It would be interesting to see if the official openAPI generated clients, go and C#, have since implemented any workaround for the concerned endpoints.

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