REST endpoint metadata in java
All I am looking f开发者_如何学Cor some method to show metadata info about RESTful webservice, e.g. operations, parameters and so on. Do u know any ?
One popular solution is to use Atom and AtomPub
I hear HTML is popular for representing end point meta data. You have link refs, you have forms for payloads, lots of room for english text to explain things, the format is well documented with a well known processing model.
Some rest endpoints support WADL.
WADL to REST is similar as WSDL to JAX-WS (SOAP).
You can find more about wadl at: http://wadl.java.net/ (including specification link).
Jersey (http://jersey.java.net) is a Oracles JSR-311 Reference implementation and it also have some additional features, like automatic WADL generation, which was recently (version 1.9) improved - it includes XSD schema for transmitted types (that can be used for far better client code generation).
In general, if you want to use some standard, please use WADL and don't reinvent the wheel..
The jax-doclets package can generate javadoc-like documentation from your JAX-RS or JAXB annotations.
http://www.lunatech-labs.com/open-source/jax-doclets
On our projects we currently generate documentation by hand but we are beginning to evaluate this tool.
精彩评论