How to read specifications from a REST Web Service How to read specifications from a REST Web Service json json

How to read specifications from a REST Web Service


The format json-home has been designed as a format to assist in the runtime discovery of resources available in an API. There are other formats such as Swagger, WADL, RAML, Api Blueprint, that can be used to describe an API. However, in order to ensure the client and server remained loosely coupled these specifications should be consumed only at runtime, not at design time by a client.


There is the standard WADL, the emerging RSDL, API hosting facilities may implement their own documentation standard (RAML - Mule, Api Blueprint - apiary.io), and Swagger produces an API listing. There is no universal standard that everyone implements. If your spec requires you to be able to read all, you can set up a priority and check for each type of document, parsing the preferred format first.

If these are corporate services, you have some control over the server side, and could coerce providers to implement WADL or swagger which would be easy to consume (wadl2jave or swagger's json listing).

Note: https://datatracker.ietf.org/doc/html/draft-nottingham-json-home-02 mentioned in another answer is an expired IETF draft.