top | item 33277399

(no title)

terwey | 3 years ago

It should be possible to generate a Client from the Swagger (OpenAPI) specification. Pick a language you like, generate the client and setup the end-to-end (e2e) tests for the API.

In Go I do this for gRPC using the build-in unit tests of the language.

It'll be painful but once complete you can hammer away at the code with a sledgehammer and know you didn't break endpoints if the tests pass.

discuss

order

poplarstand|3 years ago

Thank you so much for this!

I didn't realize Swagger/OpenAPI had a way to auto-generate its specification. Your comment led me down the rabbit hole and helped me to find a few options that might do the trick.

terwey|3 years ago

Awesome I hope it works out for you!