3 ms·
> It was created to help users discover resources It's not the first time I see this claim in a REST API. What is it supposed to mean? Does it hint at some for
by norswap 10y ago
> It was created to help users discover resources
It's not the first time I see this claim in a REST API. What is it supposed to mean? Does it hint at some form of automatic (machine-driven) discovery, or is it just a pompous way to say they expose capabilities via a REST API?
- liveoneggs 10y agoa principal of REST which is often ignored or improperly implemented is hypermedia-driven discovery. You should be able to discover the entire api via a top-level entry point which will return a bunch of links. https://en.wikipedia.org/wiki/HATEOAS https://en.wikipedia.org/wiki/HATEOAS
- nailer 10y agoIt's really weird: - SOAP had discovery - XML based REST APIs had discovery (via HATEOAS) - JSON based REST APIs inevitably never have discovery (looks like there's no standard JSON version of the 'link rel' from HATEOAS) - GraphQL has discovery
- liveoneggs 10y agoif you implement swagger (now openapi) then you put the discovery in: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#pathsObject https://github.com/OAI/OpenAPI-Specification/blob/master/ver...