2 ms·
When looking at the concept, it's interesting to me how much the pseudo code looks like a real REST API handler written in a state machine DSL. Decision graph:
by Terretta 13y ago
When looking at the concept, it's interesting to me how much the pseudo code looks like a real REST API handler written in a state machine DSL.
Decision graph: http://clojure-liberator.github.io/liberator/tutorial/decision-graph.html http://clojure-liberator.github.io/liberator/tutorial/decisi...
Actual code: http://clojure-liberator.github.io/liberator/tutorial/all-together.html http://clojure-liberator.github.io/liberator/tutorial/all-to...
Progenitor = Erlang Webmachine: https://github.com/basho/webmachine/wiki/Overview https://github.com/basho/webmachine/wiki/Overview
I'd rather write a working API than this separate spec language. By writing your 'spec' as a state machine, you get REST formality and consistency, plus, well, you now have something that works.
OTOH, running an existing API through something that would generate this RAML document could be very interesting as a way to make sure everyone's on the same page in a language neutral way.
- usarid 13y agoI like to think design-first and if possible in the most minimal fashion that captures the interface, but I certainly see (and share) the appeal of writing working code. In many cases like that (including APIs that are already implemented in code), generating a clean RAML spec from the code is a good way of capturing the interface itself, in a very readable way that shows the structure. Thanks for these links -- very interesting!