Comment by beders

3 days ago

I always urge software architects (are they still around?) and senior engineers in charge of APIs to think very carefully about the consumers of the API.

If the only consumer is your own UI, you should use a much more integrated RPC style that helps you be fast. Forget about OpenAPI etc: Use a tool or library that makes it dead simple to provide data the UI needs.

If you have a consumer outside your organization: a RESTish API it is.

If your consumer is supposed to be generic and can "discover" your API, RESTful is the way to go.

But no one writes generic ones anymore. We already have the ultimate one: the browser.