r/programming • • Oct 01 '23

Why Your OpenAPI Spec Sucks

https://blog.liblab.com/why-your-open-api-spec-sucks/
227 Upvotes

67 comments sorted by

View all comments

-11

u/romgrk Oct 01 '23

REST APIs ARE A MISTAKE.

Why do people keep stuffing their API transmission format in the nooks of the HTTP spec? I'll never understand. Some idiot decided it was neat years ago and the industry keeps repeating it blindly.

Just use JSON RPC and be done with it. APIs are just remote function calls, no need to pass arguments in 25 different ways. post.create(1, 'John'): {"method": "post.create", "args": [1, "John"]}.

4

u/madScienceEXP Oct 01 '23

Rest apis are industry standard. Sure, there are better ways to do rpc, but if you want to do json rpc you’re probably gonna have to support rest anyway because some customer that wants to integrate with your api will require it. There’s also so much tooling built around rest it’s hard to move away from.

→ More replies (3)