by DanI-S on 10/2/13, 4:20 PM with 55 comments
by jalfresi on 10/2/13, 6:31 PM
I thought everything you needed to write a REST API client is included in the media-type specification and the rel profile?
For example, the spec for the HTML media-type details that link elements with the rel type of "stylesheet" should be resolved by HTTP GET.
My understanding was that (in the example given) you write a spec for your music description media-type e.g. MUSICML, and register it with IANA (because media-types MUST be registered with a central authority). Then your client only need make a HTTP OPTIONS request to see that the Content-Type e.g. vnd.example.com/musicml+v1.0 and the methods allowed on that resource.
As long at the client uses the described rel profiles appropriate to the media-type MUSICML e.g. the spec specifies that the rel type "play" should HTTP GET the specified WAV file and play it in the client, then the server owner is free to modify the API endpoints as they wish.
I never understood why people insist in adding more layers of cruft on top of a perfectly adequate transfer protocol (HTTP) that is almost always worse and brittle than what the existing protocol already provides.
(don't get me wrong, I appreciate that hardly anyone does rest properly, but that doesnt mean WSDL-flavour-of-the-month will have as much uptake as HTTP itself!)
by Terretta on 10/2/13, 7:26 PM
Decision graph: http://clojure-liberator.github.io/liberator/tutorial/decisi...
Actual code: http://clojure-liberator.github.io/liberator/tutorial/all-to...
Progenitor = Erlang Webmachine: 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.
by rgbrgb on 10/2/13, 5:24 PM
by mcguire on 10/2/13, 8:59 PM
Second, YAML? Haven't we already learned that markup languages don't make good programming languages? (That's what this is, right? Nobody is really going to use it to document an API, any more than anyone uses WSDL for more than generating stubs.)
Third (and not really germane), JSON schemas? Describing the format of JSON documents, in JSON? Because XML schemas are so wonderful?
by taeric on 10/2/13, 5:44 PM
I should add I do not find WSDL/WADL as horrible as it could be. There is something nice about being able to generate a client in one of any given number of languages that can hit a service. Sorta sucks when you can't do that with a traditional workflow in REST.
by zzen on 10/2/13, 7:14 PM
I'm happy that Mulesoft are getting on the "better, human readable API DSL" bandwagon. It's very important.
At Apiary we found that embedding one format (Markdown, for human-readable documentation) into another format (YAML, for structured parseable data) is hard for the consumer, tough for the text editors/IDEs/syntax highlighters and ultimately useless. That's why apiblueprint.org is PURE markdown, that displays well on GitHub, has great syntax-highlighting support in your editor - and is just as parseable (since we ship an MIT-licensed parser with it).
I wish we could've united on a single format, but I guess the stronger will win and a little competition is always good for the end-users.
by jamespitts on 10/2/13, 7:41 PM
Complexity-enabling standards are often a sign that a funky, little nook of software is maturing. It is a sign of huge success, too, because new layers are beckoning to lay on top of an old layer.
We had a good run with REST and JSON, which managed to hold back corporate software engineering culture -- represented in standards like SOAP and WSDL -- for a very long time. No doubt there is a future even with "complexification", but I think that new alternatives will come soon into the fray.
by ImJasonH on 10/2/13, 7:35 PM
This powers the online APIs Explorer (https://developers.google.com/apis-explorer) and code generators (e.g., https://code.google.com/p/google-api-go-client/source/browse...)
APIs created using Cloud Endpoints on App Engine also generate a Discovery document for their APIs (https://developers.google.com/appengine/docs/java/endpoints/)
by publicfig on 10/2/13, 5:13 PM
by madisp on 10/2/13, 5:46 PM
by rektide on 10/2/13, 5:42 PM
It is, however, entirely mobile hostile.
by louischatriot on 10/2/13, 5:16 PM
(not saying ML could be used to do that, more like "didn't we learn with UML that these kind of stuff brings pain and no benefits")
by phamilton on 10/3/13, 3:11 PM
So it sounds like true REST is supposed to solve that. How?
by grogenaut on 10/2/13, 4:55 PM
Also, put a simple example on the main github page and don't make me go scavenge through 8 links to find out what the thing is.
by nickporter on 10/2/13, 7:39 PM
I feel like a REST API is the interface, and a web app is just the implementation. Makes sense to separate the two.
Although somewhat unrelated, this reminds me of https://thrift.apache.org
by viblo on 10/3/13, 3:57 AM
by nfoz on 10/3/13, 4:46 AM
web devs, whyyyyy
by mishkinf on 10/2/13, 7:53 PM
by crazychrome on 10/2/13, 9:34 PM
how about further narrow down the scope, e.g. only focus on describe relationship among apis (how a song api related to album, musician apis)?
by tylermauthe on 10/3/13, 5:56 AM