A rant about APIs

11 points by clintonb


regalialong

Show of hands. Who likes handwriting API clients? If your hand is up, I don’t believe you. The OpenAPI specification has existed for 15 years. Publishing an API without one is just disrespectful at this point. Why don’t you like me? Why do you want to make my life harder when I’m trying to give you money? Help me help you. Give me a spec so I can generate a typed client and focus on my business.

People actively want OpenAPI generated clients?

Maybe I just pick the wrong languages (Go and .NET) with the wrong projects, but every experience of mine with generated clients has been pretty sucky, because you'll get loads of generated unidiomatic objects with no guide on how to use since the spec author likely doesn't even know / actively use the language you're writing in.

I thought everyone put up with it because codegen is cheaper than wasting (for lack of a better word) engineers away at making banger API clients.

In contrast to figuring the incantation requires to call the generated output, I've preferred to just write out the requests myself because I can make nicer code with it.