Overview of RESTful API Description Languages
RESTful (representational state transfer) API (application programming interface) DLs (description languages) are formal languages designed to provide a structured description of a RESTful web API that is useful both to a human and for automated machine processing. API Description Languages are sometimes called interface description languages (IDLs). The structured description might be used to generate documentation for human programmers; such documentation may be easier to read than free-form documentation, since all documentation generated by the same tool follows the same formatting conventions. Additionally, the description language is usually precise enough to allow automated generation of various software artifacts, like libraries, to access the API from various programming languages, which takes the burden of manually creating them off the programmers.
There are two previous major description languages: WSDL2.0 (Web Services Description Language) and WADL (Web Application Description Language). Neither is widely adopted in the industry for describing RESTful APIs, citing poor human readability of both and WADL being actually unable to fully describe a RESTful API.
An alternative approach to building RESTful APIs is known under the acronym HATEOAS (Hypermedia as the Engine of Application State). In this approach, the client software is not written to a static interface description shared through documentation. Instead, the client is given a set of entry points and the API is discovered dynamically through interaction with these endpoints. HATEOAS was introduced in Roy Fielding's doctoral thesis Architectural Styles and the Design of Network-based Software Architectures. HATEOAS has been the original vision for RESTful APIs which distinguished them from RPC mechanisms.
List of RESTful API DLs
- Web Services Description Language (WSDL)
- Web Application Description Language (WADL)
- Google Cloud Endpoints
- Open Data Protocol (OData)
- OpenAPI Specification
- RESTful Service Description Language (RSDL)
- RESTful API Modeling Language (RAML)
- Apache Avro
Comparison of RESTful API DLs
The community around RESTful API DLs is active and the landscape is still changing. According to a presentation by Akana, the most active projects in this area are OpenAPI, RAML and API Blueprint.
|Sponsor||Initial commit||Latest stable release||Stable release date||Software license||Format||Open Source||Code generation (client)||Code generation (server)|
|RAML||MuleSoft||September, 2013||1.0||May 16, 2016||Apache 2.0||YAML||Yes||Yes||Yes|
|OpenAPI||Open API Initiative (OAI)||July, 2011||3.0||February, 2021||Apache 2.0||JSON or YAML||Yes||Yes||Yes|
- Fielding, Roy. "REST APIs must be hypertext-driven". Retrieved 4 November 2015.
- Licenses here are a summary, and are not taken to be complete statements of the licenses. Some packages may use libraries under different licenses.