restful-api-description-language / RADL

RADL: A description language and tooling for hypermedia-driven RESTful APIs
Apache License 2.0
23 stars 5 forks source link

Generate sample HTTP calls #11

Open jonathanrobie opened 9 years ago

jonathanrobie commented 9 years ago

Should the stylesheet generate sample HTTP calls for methods? Several people have requested this.

If we do so, should we obscure the URI do discourage people from coding to it, or is that being too paternalistic?

RaySinnema commented 9 years ago

Seems like a duplicate of #4.

jonathanrobie commented 9 years ago

I don't think so.

4 requires a chain of calls, and I'm not sure that it's feasible, because we would have to ensure that the messages in each step of the chain are consistent with each other. I'd like to see a proof of concept for that. But generating an individual message is probably quite straightforward.

RaySinnema commented 9 years ago

Generating an individual message is something that makes sense for "pragmatic" REST APIs. For hypermedia-driven APIs, you'll need the response of the previous request to know what your next request looks like, so you always need at least two chained requests.

So I still believe this is a duplicate of #4.

RADL contains all the information to "ensure that the messages in each step of the chain are consistent with each other". We just have to start at some state (either the start state or some previously bookmarked state) and follow a couple of transitions.