WAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIML: Towards a Modeling
Infrastructure for Web APIs
Hamza Ed-douibi1, Javier Luis Cánovas Izquierdo1, Francis Bordeleau2, Jordi
Cabot3
1Internet Interdisciplinary Institute (IN3) - Universitat Oberta de Catalunya (UOC), Barcelona, Spain
2École de technologie supérieure, Université du Québec, Montreal, Canada
3Internet Interdisciplinary Institute (IN3) - ICREA, Barcelona, Spain
Munich, September 19, 2019
…consortium of forward-looking
industry experts who recognize
the immense value of
standardizing on how REST APIs
are described…
…is focused on creating,
evolving and promoting a vendor
neutral description format…
https://www.openapis.org
4 OpenAPI
E x a m p le
"info": {
"description": "This is … ",
"version" : "1.0.0",
"title": “…",
"contact": {…},…
}
Metadata
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"license": {
"name": "MIT"
}
},
"host": "petstore.swagger.io",
"basePath": "/v1",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/pets": {
"get": {
"summary": "List all pets",
"operationId": "listPets",
"tags": [
"pets"
],
"parameters": [
{
"name": "limit",
"in": "query",
"description": "How many items to return at one time
(max 100)",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "An paged array of pets",
"headers": {
"x-next": {
"type": "string",
"description": "A link to the next page of
responses"
}
},
"schema": {
"$ref": "#/definitions/Pets"
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
OpenAPI definition
"paths":{
"/pet/{petId}":{
"get":{
"parameters":[
{ "name":"petId",
"in":"path",...
}
],
"responses":{
"200":...,
},...
},...
},
Operations
"definitions":{
"Pet":{
"type":"object",
"properties":{
"id":...,
"category":...,
"name":...,
...
} }
Schema
6 Proposal
Better visualization and
understanding of the data
model and operations of a
REST API.
Easier integration of REST
APIs in all kinds of model-
based processes.
OpenAPI to UML
and back
Model–based editor for
OpenAPI definitions
11 Conclusions and future work
What we have shown
What we plan to do
Support OpenAPI 3
Support new UML diagrams
Support other Web APIs specifications (e.g., OData)
An OpenAPI round-trip tool that leverages model-driven techniques to
create, visualize, manage, and generate OpenAPI definitions using an
OpenAPI DSL also expressed as a UML profile
Thank you!
WAPIML: Towards a
Modeling Infrastructure
for Web APIs
Hamza Ed-douibi, Javier Luis
Cánovas Izquierdo, Francis
Bordeleau, Jordi Cabot
https://github.com/opendata-for-all/wapiml