Friday, March 29, 2024

API specs: Swagger/OpenAPI, WADL, RAML

Microsoft Azure AI APIs have specs in Swagger (JSON), WADL (XML) and "English" format.
Cognitive Services APIs Reference

Another approach is to use WADL, which can be generated by some tools. In this case, it’s machine-readable, but definitely not human-readable. Also, writing a WADL manually is a tedious process.






RESTful API Modeling Language (RAML) is a YAML-based language for describing static APIs (but not REST APIs).





Revisiting the features offered in WADL, RAML, and Swagger - RESTful Java Web Services - Second Edition [Book]

Features

WADL

RAML

Swagger

Release date

2009

2013

2011

File format

XML

RAML

JSON/YAML

Open source

Yes

Yes

Yes

Commercial offering

No

Yes

Yes

Language support

Java

JS, Java, Node, PHP, Python, and Ruby

Clojure, Go, JS, Java, .Net, Node, PHP, Python, Ruby, and Scala

Authentication

No

Basic, Digest, OAuth 1, and OAuth 2

Basic, API Key, and OAuth 2

API console

No

Yes

Yes

Code generation for server (Java)

No

Yes

Yes

Code generation for client (Java)

Yes

Yes

Yes

No comments: