logoalt Hacker News

ezekgyesterday at 5:46 PM1 replyview on HN

Now if only we had a service that could generate OpenAPI specs automatically...


Replies

supriyo-biswasyesterday at 5:59 PM

The OpenAPI autogenerated clients kinda suck though.

My preferred approach for doing this is to have a hand-rolled SDK generator that reads the request, response and error models out of the microservice project and emits the same in each language targeted by the SDK, along with a minimal stub that calls the API.

You then spend 15 minutes at most, customizing the stub if needed, if you need custom behaviours like streaming.

show 1 reply