-
Notifications
You must be signed in to change notification settings - Fork 132
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
Generate rest api via OpenAPI #195
Comments
Sorry for only getting back to this now, but I've been making some changes to the REST api (#197), where I am now creating all the rest endpoint handlers manually (and not using the generated gateway files). The reason for this change was that the generated code does not allow for as much customization as we would have liked, and as a result, there is now a discrepancy between the generated I can still generate the |
Based on my experience the OpenAPI workflow is comfortable when it is used to generate docs, models, clients, and so on. As soon as one of those bits is lost the situation easily gets out of control. But if it does not feet our needs I presume the game is over 😁 😁 Do we need the REST API? From my understanding, GRPC can be used client-side as well https://pace.dev/blog/2020/02/26/tech-stack-at-pace.html (section "Services: Should I use REST or RPC?") Thank you for trying it! |
Yeah no problem. I was thinking we could still use the swagger.json files as a base, since I don't expect the api to be rapidly changing or growing. But yeah, it wouldn't be using OpenAPI and it'll be written/maintained manually. |
NOt needed for now |
I had a chat with @kdeng3849 about OpenAPI and my transformation from a code generator hater to its fun because doing API requires a lot of code that is actually kind of boring not that maintainable manually written.
I had the opportunity to work on two projects one after each other, both where using
swagger.yaml
but only one was generating the code out from it. The one that generated the code was very much a pleasure to work with.You get documentation for free, your documentation is always in line with the code. You can generate a baseline for SDKs. It is much easier to get a consistent flavor compared with the hands written one. At least from my experience.
She quickly tried to do it starting from our proto https://github.com/kdeng3849/tink/tree/open-api/protos but she got stuck along the way and she asked me to open an issue to discuss it publicly. (@kdeng3849 if you can add a bit more context it will be great).
here it is!
The text was updated successfully, but these errors were encountered: