Swagger: A simple, open standard for describing REST APIs with JSON
swagger.wordnik.com
swagger.wordnik.com
That being said, this is exactly the sort of documentation that's helpful for this kind of API.
IOW, would the following be RESTful?
GET /entries/{word} # Return entries for a word
GET /wordForms/{word} # Rturn other forms for a word
POST /wordForms/{word} # Adds a relationship map for a word
See: http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hyperte...
Any APIs you can point to that actually use "hypermedia" and are successful? Most good APIs I've seen just define a bunch of simple JSON endpoints with predictable URLs.
http://kenai.com/projects/suncloudapis/pages/Home
I don't know how successful they are.
This is used to power the APIs Explorer, and code/documentation generation for client libraries:
* APIs Explorer: https://code.google.com/apis/explorer
* JavaDoc for the generated Java library for Calendar API: http://javadoc.google-api-java-client.googlecode.com/hg/apis...
* PyDoc for the Python library: http://api-python-client-doc.appspot.com/calendar/v3
Client implementations include:
- Perl: https://github.com/franckcuny/net-http-spore
- JS (Node): https://github.com/francois2metz/node-spore
- Lua: https://github.com/fperrad/lua-Spore
- Ruby: https://github.com/sukria/Ruby-Spore
- Clojure: https://github.com/ngrunwald/clj-spore
I suppose the desire is to have a service describing itself so proxies can be code gen'd, but I'm glad I've stepped away from that world and don't miss the WSDL days.
That being said, there are some thing that they do that Swagger seems to be missing (or I am just missing it). For instance Enunciate does not require any custom annotations but uses the normal Javadoc instead, which is a very good feature. And how do I run Swagger, can I plug this into my Maven build process and include in the generated war file?
You can run swagger with the built-in support via swagger-core/swagger-jaxrs. Play 1.4/2.0 support is there as well and a number of folks are creating support for other server frameworks. See the samples for integration:
https://github.com/wordnik/swagger-core/tree/master/samples
But to be honest, you can run the whole system with static files and zero server integration.
The downside of using javadocs is that you need to expose sourcecode/docs.
I'm talking about a simple CRUD type APIs for quick development. Ideally it would have user sign up and simple field validation baked in.
http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch...
/s