SlideShare a Scribd company logo
Model-driven Round-trip
Engineering of REST APIs
Hamza Ed-douibi
May 13, 2019
Supervised by : Jordi Cabot and
Javier Luis Cánovas Izquierdo
1
AGENDA
3
4
5
MOTIVATION
APPROACH
CONTRIBUTIONS
SUMMARY & FUTURE WORK
2 PROBLEM STATEMENT
MOTIVATION
REST
Representational state transfer (REST)
ProgrammableWeb:
more than 21 000 APIs
5 Motivation
6 Motivation
Not easy to understand
Hard to maintain
No automatization
7 REST APIs
D e s c r ip t i o n f o r m a t s / p r o t o c o l s
OData
…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
9 OpenAPI
E x a m p l e http://petstore.swagger.io/v2/pet/123GET
"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
{
"id": 123,
"category": {
"id": 1,
"name": "dogs"
},
"name": "doggie",
"photoUrls": [
"http://example.com"
],
"tags": [
{
"id": 1,
"name": "black"
}
],
"status": "available"
}
10 OpenAPI
A d v a n t a g e s
Generate code
Generate
documentation
Swagger UISwagger Codegen
Holistic view of
functionality
Automatization
PROBLEM
STATEMENT
12 Problem statement
Composition
Awesome!….but
Many resources without APIs
Many APIs without OpenAPI
definitions
Testing REST APIs is hard
Limited support for generating
REST APIs
Limited composition approaches
NO
APIfication
Discovery
Testing
Generation
Composition
APPROACH
14 Approach
uses
15 Model-driven Engineering
M D E - b a s e d s o f t w a r e d e v e l o p m e n t p r o c e s s
Original model
… CODE
Software code1 refinementst n refinementth
Model-to-model
Transformation
Model-to-text
Transformation
CODE
CODE
16 Approach
uses
17 OpenAPI
T h e O p e n A P I m e t a m o d e l
18 OpenAPI
T h e O p e n A P I p r o f i l e
CONTRIBUTIONS
APIDiscoverer
Example-driven discovery of Web API
specifications
21 APIDiscoverer
22 APIDiscoverer
M o t i v a t i o n
Machine-readable description
(barely) Human-readable
descriptions
23 APIDiscoverer
A p p r o a c h
APIDiscoverer
Discovery &
Enrichment
Generation
OpenAPI
model
Example 1
call 1
response 1
Example
provision
Example 2
call 2
response 2
Example
provision
Example n
call n
response n
Example
provision
OpenAPI
definition
24 APIDiscoverer
G e n e r a l v i e w o f t h e a p p r o a c h
OpenAPI
definition
Structural Discoverer
Behavioral Discoverer
OpenAPI metamodel
OpenAPI model
UML modelJSONDiscoverer UML2Schema
Conforms to
OpenAPI
generator
Example Provision Discovery Generator
API call
examples
{
"request": {
"method" : "POST" ,
"url" : "http://petstore... ",
"body" : { ... }
},
"response" : {
"status" : 200,
"body" : { ... }
}
}
{
"request": {
"method" : "GET" ,
"url" : "http://petstore... ",
"body" : { ... }
},
"response" : {
"status" : 200,
"body" : { ... }
}
}
{
"request": {
"method" : "GET" ,
"url" : "http://petstore... ",
"body" : { ... }
},
"response" : {
"status" : 200,
"body" : { ... }
}
}
25 APIDiscoverer
D i s c o v e r y
OpenAPI
definition
Structural Discoverer
Behavioral Discoverer
OpenAPI metamodel
OpenAPI model
UML modelJSONDiscoverer UML2Schema
Conforms to
OpenAPI
generator
Example Provision Discovery Generator
API call
examples
26 APIDiscoverer
D i s c o v e r y & E n r i c h m e n t
Behavioral Discoverer
Source Target
host
basepath
protocol
API
relativePath Path
httpMethod
request-body
response-body
Operation
Query
relative-Path
request-Body
Parameter
response-Code Response
request-body
response-body
Schema
http://petstore.swagger.io/v2/pet/123GET
{
"id": 123,
"category": {
"id": 1,
"name": "dogs"
},
"name": "doggie",
"photoUrls": [
"http://example.com"
],
"tags": [
{
"id": 1,
"name": "black"
}
],
"status": "available"
}
27 APIDiscoverer
D i s c o v e r y & E n r i c h m e n t
Structural Discoverer
JSONDiscoverer
Behavioral Discoverer
Source Target
host
basepath
protocol
API
relativePath Path
httpMethod
request-body
response-body
Operation
Query
relative-Path
request-Body
Parameter
response-Code Response
request-body
response-body
Schema
{
"id": 123,
"category": {
"id": 1,
"name": "dogs"
},
"name": "doggie",
"photoUrls": [
"http://example.com"
],
"tags": [
{
"id": 1,
"name": "black"
}
],
"status": "available"
}
28 APIDiscoverer
D i s c o v e r y & E n r i c h m e n t
29 APIDiscoverer
O p e n A P I g e n e r a t o r
OpenAPI
definition
Structural Discoverer
Behavioral Discoverer
OpenAPI metamodel
OpenAPI model
UML modelJSONDiscoverer UML2Schema
Conforms to
OpenAPI
generator
Example Provision APIDiscoverer Generator
API call
exxamples
{"swagger":"2.0",
"info":{ },
"host":"petstore.swagger.io","basePath":"/v2",
"tags":[ "pet" ],"Schemes":[ "http" ],
"paths":{
"/pet/{petId}":{
"get":{
"produces":["application/json"],
"parameters":[{"name":"petId","in":"path","type":"integer"}],
"responses":{
"200":{
"description":"OK",
"schema":{"$ref":"#/definitions/Pet"
}}}}
}},
"definitions":{
"Pet":{
"type":"object",
"properties":{
"id":{"type":"integer"},
"category":{"$ref":"#/definitions/Category"},
"name":{"type":"string"},
"photoUrls":{"type":"array","items":{"type":"string"}},
"tags":{"type":"array","items":{"$ref":"#/definitions/Tag"}},
"Status":{"type":"string"}},
}}}
30 APIDiscoverer
T o o l s u p p o r t
31
Discover other aspects: non-functional properties,
semantic definitions, security mechanisms
Discovery
extensions
Textual analysis of API documentation websites to
infer call examples
Generation of
call examples
Support OpenAPI 3OpenAPI 3
APIDiscoverer
F u t u r e w o r k
APITester
Specification-based generation of test cases
for REST APIs
John Greim—Getty Images
33 APITester
34 APITester
M o t i v a t i o n
35 APITester
M o t i v a t i o n
Leveraging OpenAPI for
testing
• High coverage level
• Parameter input generation
Limited coverage level
Limited parameter input
generation
36 APITester
A p p r o a c h
OpenAPI
definition
OpenAPI metamodel
TestSuite metamodel
Testing
preparation
Model
Extraction
Model
trans.
Code
Gen.
CODE
CODE
Java
Junit
tests
37 APITester
A p p r o a c h
OpenAPI
definition
OpenAPI metamodel
TestSuite metamodel
Testing
preparation
Model
Extraction
Model
trans.
Code
Gen.
CODE
CODE
Java
• Simple parameter (examples, default values, enums)
• Dummy parameter
• Complex parameter (response of an operation)
Inference rules
Junit
tests
38 APITester
A p p r o a c h
39 APITester
A p p r o a c h
OpenAPI
definition
OpenAPI metamodel
TestSuite metamodel
Testing
preparation
Model
Extraction
Model
trans.
Code
Gen.
CODE
CODE
Java
Junit
tests
40 APITester
T e s t S u it e m e t a m o d e l
41 APITester
A p p r o a c h
OpenAPI
definition
OpenAPI metamodel
TestSuite metamodel
Testing
preparation
Model
Extraction
Model
trans.
Code
Gen.
CODE
CODE
Java
Junit
tests
42 APITester
A p p r o a c h
GR 1. Nominal test case GR 2. Faulty test
case
43 APITester
A p p r o a c h
GR 1. Nominal test
case
GR 2. Faulty test
case
44 APITester
A p p r o a c h
OpenAPI
definition
OpenAPI metamodel
TestSuite metamodel
Model
Extraction
Model
Extraction
Model
trans.
Code
Gen.
CODE
CODE
Java
Junit
tests
45 APITester
A p p r o a c h
46
Increase coverage levels by improving our parameter
inference technique
Coverage
Support OpenAPI 3
Integration
testing
APITester
F u t u r e w o r k
APIComposer
Model-based composition of REST APIs
John Greim—Getty Images
48 APIComposer
49 APIComposer
OData request
OData response
End-users
OpenAPI
OData
50 OData
OData is a standardized protocol for
creating and consuming data APIs
Resources are defined in
a data model
D a t a m o d e l
URIs to identify resources
and query data
Q u e r y
JSON and XML/Atom to
de/serialize data
S e r i a l i z a t i o n
OData
51 APIComposer
P r o c e s s
GET http://restcountries/alpha/ES
GET Battuta.medunes.net/region/ES/all
{"@odata.context":"$metadata#Country",
"name": "Spain",
"code": "ES",
"population": 46538422,....
"regions":[
{"name": "Andalucia"},
{"name": "Aragon"},
{"name":"Canary Islands"},,...]
}
"name": "Spain",
"code": "ES",
"population": 46538422,....
{"name": "Andalucia"},
{"name": "Aragon"},
{"name":"Canary Islands"},...]
53
Extend the matching strategy: Semantic, Non-functional
properties
Matching
strategy
Support data modification operations
Data
modification
Support other formats: GraphQL, OpenAPI 3Other formats
APIComposer
F u t u r e w o r k
54 Side effects
O p e n A P It o U M L
Visualization of OpenAPI
definitions as UML
Class diagrams
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.
55 Side effects
O p e n A P It o U M L
SUMMARY &
FUTURE WORK
57 Summary
58 Publications
ICWE 2018
OData profile ICWE 2017
SAC 2016
ECFMA 2017
RCIS 2018
ESOCC 2018
EDOC 2018
International conferences
(full research papers)
4
International conferences
(short and demo papers)
3
National conferences 1
59
A case study to validate the contributions of the thesis in
a single industrial scenario
All-in-One
Smart cities are a potential direction to apply to the
work presented in this thesis
Smart cities
Extend our work to support non-functional requirements
Non-functional
requirements
Extend our work to support GraphQLGraphQL
Future work
Thank you!
Model-driven Round-trip
Engineering of REST
APIs
Hamza Ed-douibi
Supervised by : Jordi Cabot and
Javier Luis Cánovas Izquierdo

More Related Content

Similar to Model-driven Round-trip Engineering of REST APIs

Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortals
Axway
 
Android training in Nagpur
Android training in Nagpur Android training in Nagpur
Android training in Nagpur
letsleadsand
 
Android classes-in-pune-syllabus
Android classes-in-pune-syllabusAndroid classes-in-pune-syllabus
Android classes-in-pune-syllabus
cncandrwebworld
 
ExSchema - ICSM'13
ExSchema - ICSM'13ExSchema - ICSM'13
ExSchema - ICSM'13
jccastrejon
 
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs DocumentationDRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
Sebastiano Panichella
 
RACK-Tool-ICSE2017
RACK-Tool-ICSE2017RACK-Tool-ICSE2017
RACK-Tool-ICSE2017
Masud Rahman
 
2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards
APIsecure_ Official
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer tools
Sashko Stubailo
 
smartAPI: Towards a more intelligent network of Web APIs
smartAPI: Towards a more intelligent network of Web APIssmartAPI: Towards a more intelligent network of Web APIs
smartAPI: Towards a more intelligent network of Web APIs
Amrapali Zaveri, PhD
 
Analyzing APIs Documentation and Codeto Detect Directive Defects
Analyzing APIs Documentation and Codeto Detect Directive DefectsAnalyzing APIs Documentation and Codeto Detect Directive Defects
Analyzing APIs Documentation and Codeto Detect Directive Defects
Sebastiano Panichella
 
Usable APIs at Scale
Usable APIs at ScaleUsable APIs at Scale
Usable APIs at Scale
Tim Burks
 
Mulesoft Raml APIs
Mulesoft Raml APIsMulesoft Raml APIs
Mulesoft Raml APIs
akshay yeluru
 
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays
 
JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019
Intesys
 
apidays LIVE Australia 2021 - OpenAPI Generator - The Babel Fish of the API W...
apidays LIVE Australia 2021 - OpenAPI Generator - The Babel Fish of the API W...apidays LIVE Australia 2021 - OpenAPI Generator - The Babel Fish of the API W...
apidays LIVE Australia 2021 - OpenAPI Generator - The Babel Fish of the API W...
apidays
 
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays
 
DeepPavlov 2019
DeepPavlov 2019DeepPavlov 2019
DeepPavlov 2019
Mikhail Burtsev
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
Edge AI and Vision Alliance
 
Icpc08b.ppt
Icpc08b.pptIcpc08b.ppt
Specification-driven API Design vs Technical Writers
Specification-driven API Design vs Technical WritersSpecification-driven API Design vs Technical Writers
Specification-driven API Design vs Technical Writers
Lukas Leander Rosenstock
 

Similar to Model-driven Round-trip Engineering of REST APIs (20)

Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortals
 
Android training in Nagpur
Android training in Nagpur Android training in Nagpur
Android training in Nagpur
 
Android classes-in-pune-syllabus
Android classes-in-pune-syllabusAndroid classes-in-pune-syllabus
Android classes-in-pune-syllabus
 
ExSchema - ICSM'13
ExSchema - ICSM'13ExSchema - ICSM'13
ExSchema - ICSM'13
 
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs DocumentationDRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
DRONE: A Tool to Detect and Repair Directive Defects in Java APIs Documentation
 
RACK-Tool-ICSE2017
RACK-Tool-ICSE2017RACK-Tool-ICSE2017
RACK-Tool-ICSE2017
 
2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer tools
 
smartAPI: Towards a more intelligent network of Web APIs
smartAPI: Towards a more intelligent network of Web APIssmartAPI: Towards a more intelligent network of Web APIs
smartAPI: Towards a more intelligent network of Web APIs
 
Analyzing APIs Documentation and Codeto Detect Directive Defects
Analyzing APIs Documentation and Codeto Detect Directive DefectsAnalyzing APIs Documentation and Codeto Detect Directive Defects
Analyzing APIs Documentation and Codeto Detect Directive Defects
 
Usable APIs at Scale
Usable APIs at ScaleUsable APIs at Scale
Usable APIs at Scale
 
Mulesoft Raml APIs
Mulesoft Raml APIsMulesoft Raml APIs
Mulesoft Raml APIs
 
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
apidays LIVE Paris 2021 - Getting started with Event-Driven APis by Hugo Guer...
 
JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019
 
apidays LIVE Australia 2021 - OpenAPI Generator - The Babel Fish of the API W...
apidays LIVE Australia 2021 - OpenAPI Generator - The Babel Fish of the API W...apidays LIVE Australia 2021 - OpenAPI Generator - The Babel Fish of the API W...
apidays LIVE Australia 2021 - OpenAPI Generator - The Babel Fish of the API W...
 
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
apidays LIVE London 2021 - Getting started with Event-Driven APIs by Hugo Gue...
 
DeepPavlov 2019
DeepPavlov 2019DeepPavlov 2019
DeepPavlov 2019
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
 
Icpc08b.ppt
Icpc08b.pptIcpc08b.ppt
Icpc08b.ppt
 
Specification-driven API Design vs Technical Writers
Specification-driven API Design vs Technical WritersSpecification-driven API Design vs Technical Writers
Specification-driven API Design vs Technical Writers
 

More from Jordi Cabot

AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?
Jordi Cabot
 
Model-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architecturesModel-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architectures
Jordi Cabot
 
Smart modeling of smart software
Smart modeling of smart softwareSmart modeling of smart software
Smart modeling of smart software
Jordi Cabot
 
Modeling should be an independent scientific discipline
Modeling should be an independent scientific disciplineModeling should be an independent scientific discipline
Modeling should be an independent scientific discipline
Jordi Cabot
 
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
Jordi Cabot
 
How to sustain a tool building community-driven effort
How to sustain a tool building community-driven effortHow to sustain a tool building community-driven effort
How to sustain a tool building community-driven effort
Jordi Cabot
 
All Researchers Should Become Entrepreneurs
All Researchers Should Become EntrepreneursAll Researchers Should Become Entrepreneurs
All Researchers Should Become Entrepreneurs
Jordi Cabot
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21
Jordi Cabot
 
Low-code vs Model-Driven Engineering
Low-code vs Model-Driven EngineeringLow-code vs Model-Driven Engineering
Low-code vs Model-Driven Engineering
Jordi Cabot
 
Lessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platformLessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platform
Jordi Cabot
 
Future Trends on Software and Systems Modeling
Future Trends on Software and Systems ModelingFuture Trends on Software and Systems Modeling
Future Trends on Software and Systems Modeling
Jordi Cabot
 
Ingeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulosIngeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulos
Jordi Cabot
 
Chatbot Tutorial - Create your first bot with Xatkit
Chatbot Tutorial - Create your first bot with Xatkit Chatbot Tutorial - Create your first bot with Xatkit
Chatbot Tutorial - Create your first bot with Xatkit
Jordi Cabot
 
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
Jordi Cabot
 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model Transformations
Jordi Cabot
 
WAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIsWAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIs
Jordi Cabot
 
Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?
Jordi Cabot
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?
Jordi Cabot
 
Temporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platformTemporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platform
Jordi Cabot
 
UMLtoNoSQL : From UML domain models to NoSQL Databases
UMLtoNoSQL : From UML domain models to NoSQL DatabasesUMLtoNoSQL : From UML domain models to NoSQL Databases
UMLtoNoSQL : From UML domain models to NoSQL Databases
Jordi Cabot
 

More from Jordi Cabot (20)

AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?
 
Model-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architecturesModel-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architectures
 
Smart modeling of smart software
Smart modeling of smart softwareSmart modeling of smart software
Smart modeling of smart software
 
Modeling should be an independent scientific discipline
Modeling should be an independent scientific disciplineModeling should be an independent scientific discipline
Modeling should be an independent scientific discipline
 
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
 
How to sustain a tool building community-driven effort
How to sustain a tool building community-driven effortHow to sustain a tool building community-driven effort
How to sustain a tool building community-driven effort
 
All Researchers Should Become Entrepreneurs
All Researchers Should Become EntrepreneursAll Researchers Should Become Entrepreneurs
All Researchers Should Become Entrepreneurs
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21
 
Low-code vs Model-Driven Engineering
Low-code vs Model-Driven EngineeringLow-code vs Model-Driven Engineering
Low-code vs Model-Driven Engineering
 
Lessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platformLessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platform
 
Future Trends on Software and Systems Modeling
Future Trends on Software and Systems ModelingFuture Trends on Software and Systems Modeling
Future Trends on Software and Systems Modeling
 
Ingeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulosIngeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulos
 
Chatbot Tutorial - Create your first bot with Xatkit
Chatbot Tutorial - Create your first bot with Xatkit Chatbot Tutorial - Create your first bot with Xatkit
Chatbot Tutorial - Create your first bot with Xatkit
 
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model Transformations
 
WAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIsWAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIs
 
Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?
 
Temporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platformTemporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platform
 
UMLtoNoSQL : From UML domain models to NoSQL Databases
UMLtoNoSQL : From UML domain models to NoSQL DatabasesUMLtoNoSQL : From UML domain models to NoSQL Databases
UMLtoNoSQL : From UML domain models to NoSQL Databases
 

Recently uploaded

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 

Recently uploaded (20)

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 

Model-driven Round-trip Engineering of REST APIs

  • 1. Model-driven Round-trip Engineering of REST APIs Hamza Ed-douibi May 13, 2019 Supervised by : Jordi Cabot and Javier Luis Cánovas Izquierdo
  • 4. REST Representational state transfer (REST) ProgrammableWeb: more than 21 000 APIs
  • 6. 6 Motivation Not easy to understand Hard to maintain No automatization
  • 7. 7 REST APIs D e s c r ip t i o n f o r m a t s / p r o t o c o l s OData
  • 8. …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
  • 9. 9 OpenAPI E x a m p l e http://petstore.swagger.io/v2/pet/123GET "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 { "id": 123, "category": { "id": 1, "name": "dogs" }, "name": "doggie", "photoUrls": [ "http://example.com" ], "tags": [ { "id": 1, "name": "black" } ], "status": "available" }
  • 10. 10 OpenAPI A d v a n t a g e s Generate code Generate documentation Swagger UISwagger Codegen Holistic view of functionality Automatization
  • 12. 12 Problem statement Composition Awesome!….but Many resources without APIs Many APIs without OpenAPI definitions Testing REST APIs is hard Limited support for generating REST APIs Limited composition approaches NO APIfication Discovery Testing Generation Composition
  • 15. 15 Model-driven Engineering M D E - b a s e d s o f t w a r e d e v e l o p m e n t p r o c e s s Original model … CODE Software code1 refinementst n refinementth Model-to-model Transformation Model-to-text Transformation CODE CODE
  • 17. 17 OpenAPI T h e O p e n A P I m e t a m o d e l
  • 18. 18 OpenAPI T h e O p e n A P I p r o f i l e
  • 22. 22 APIDiscoverer M o t i v a t i o n Machine-readable description (barely) Human-readable descriptions
  • 23. 23 APIDiscoverer A p p r o a c h APIDiscoverer Discovery & Enrichment Generation OpenAPI model Example 1 call 1 response 1 Example provision Example 2 call 2 response 2 Example provision Example n call n response n Example provision OpenAPI definition
  • 24. 24 APIDiscoverer G e n e r a l v i e w o f t h e a p p r o a c h OpenAPI definition Structural Discoverer Behavioral Discoverer OpenAPI metamodel OpenAPI model UML modelJSONDiscoverer UML2Schema Conforms to OpenAPI generator Example Provision Discovery Generator API call examples { "request": { "method" : "POST" , "url" : "http://petstore... ", "body" : { ... } }, "response" : { "status" : 200, "body" : { ... } } } { "request": { "method" : "GET" , "url" : "http://petstore... ", "body" : { ... } }, "response" : { "status" : 200, "body" : { ... } } } { "request": { "method" : "GET" , "url" : "http://petstore... ", "body" : { ... } }, "response" : { "status" : 200, "body" : { ... } } }
  • 25. 25 APIDiscoverer D i s c o v e r y OpenAPI definition Structural Discoverer Behavioral Discoverer OpenAPI metamodel OpenAPI model UML modelJSONDiscoverer UML2Schema Conforms to OpenAPI generator Example Provision Discovery Generator API call examples
  • 26. 26 APIDiscoverer D i s c o v e r y & E n r i c h m e n t Behavioral Discoverer Source Target host basepath protocol API relativePath Path httpMethod request-body response-body Operation Query relative-Path request-Body Parameter response-Code Response request-body response-body Schema http://petstore.swagger.io/v2/pet/123GET { "id": 123, "category": { "id": 1, "name": "dogs" }, "name": "doggie", "photoUrls": [ "http://example.com" ], "tags": [ { "id": 1, "name": "black" } ], "status": "available" }
  • 27. 27 APIDiscoverer D i s c o v e r y & E n r i c h m e n t Structural Discoverer JSONDiscoverer Behavioral Discoverer Source Target host basepath protocol API relativePath Path httpMethod request-body response-body Operation Query relative-Path request-Body Parameter response-Code Response request-body response-body Schema { "id": 123, "category": { "id": 1, "name": "dogs" }, "name": "doggie", "photoUrls": [ "http://example.com" ], "tags": [ { "id": 1, "name": "black" } ], "status": "available" }
  • 28. 28 APIDiscoverer D i s c o v e r y & E n r i c h m e n t
  • 29. 29 APIDiscoverer O p e n A P I g e n e r a t o r OpenAPI definition Structural Discoverer Behavioral Discoverer OpenAPI metamodel OpenAPI model UML modelJSONDiscoverer UML2Schema Conforms to OpenAPI generator Example Provision APIDiscoverer Generator API call exxamples {"swagger":"2.0", "info":{ }, "host":"petstore.swagger.io","basePath":"/v2", "tags":[ "pet" ],"Schemes":[ "http" ], "paths":{ "/pet/{petId}":{ "get":{ "produces":["application/json"], "parameters":[{"name":"petId","in":"path","type":"integer"}], "responses":{ "200":{ "description":"OK", "schema":{"$ref":"#/definitions/Pet" }}}} }}, "definitions":{ "Pet":{ "type":"object", "properties":{ "id":{"type":"integer"}, "category":{"$ref":"#/definitions/Category"}, "name":{"type":"string"}, "photoUrls":{"type":"array","items":{"type":"string"}}, "tags":{"type":"array","items":{"$ref":"#/definitions/Tag"}}, "Status":{"type":"string"}}, }}}
  • 30. 30 APIDiscoverer T o o l s u p p o r t
  • 31. 31 Discover other aspects: non-functional properties, semantic definitions, security mechanisms Discovery extensions Textual analysis of API documentation websites to infer call examples Generation of call examples Support OpenAPI 3OpenAPI 3 APIDiscoverer F u t u r e w o r k
  • 32. APITester Specification-based generation of test cases for REST APIs John Greim—Getty Images
  • 34. 34 APITester M o t i v a t i o n
  • 35. 35 APITester M o t i v a t i o n Leveraging OpenAPI for testing • High coverage level • Parameter input generation Limited coverage level Limited parameter input generation
  • 36. 36 APITester A p p r o a c h OpenAPI definition OpenAPI metamodel TestSuite metamodel Testing preparation Model Extraction Model trans. Code Gen. CODE CODE Java Junit tests
  • 37. 37 APITester A p p r o a c h OpenAPI definition OpenAPI metamodel TestSuite metamodel Testing preparation Model Extraction Model trans. Code Gen. CODE CODE Java • Simple parameter (examples, default values, enums) • Dummy parameter • Complex parameter (response of an operation) Inference rules Junit tests
  • 38. 38 APITester A p p r o a c h
  • 39. 39 APITester A p p r o a c h OpenAPI definition OpenAPI metamodel TestSuite metamodel Testing preparation Model Extraction Model trans. Code Gen. CODE CODE Java Junit tests
  • 40. 40 APITester T e s t S u it e m e t a m o d e l
  • 41. 41 APITester A p p r o a c h OpenAPI definition OpenAPI metamodel TestSuite metamodel Testing preparation Model Extraction Model trans. Code Gen. CODE CODE Java Junit tests
  • 42. 42 APITester A p p r o a c h GR 1. Nominal test case GR 2. Faulty test case
  • 43. 43 APITester A p p r o a c h GR 1. Nominal test case GR 2. Faulty test case
  • 44. 44 APITester A p p r o a c h OpenAPI definition OpenAPI metamodel TestSuite metamodel Model Extraction Model Extraction Model trans. Code Gen. CODE CODE Java Junit tests
  • 45. 45 APITester A p p r o a c h
  • 46. 46 Increase coverage levels by improving our parameter inference technique Coverage Support OpenAPI 3 Integration testing APITester F u t u r e w o r k
  • 47. APIComposer Model-based composition of REST APIs John Greim—Getty Images
  • 49. 49 APIComposer OData request OData response End-users OpenAPI OData
  • 50. 50 OData OData is a standardized protocol for creating and consuming data APIs Resources are defined in a data model D a t a m o d e l URIs to identify resources and query data Q u e r y JSON and XML/Atom to de/serialize data S e r i a l i z a t i o n OData
  • 51. 51 APIComposer P r o c e s s
  • 52. GET http://restcountries/alpha/ES GET Battuta.medunes.net/region/ES/all {"@odata.context":"$metadata#Country", "name": "Spain", "code": "ES", "population": 46538422,.... "regions":[ {"name": "Andalucia"}, {"name": "Aragon"}, {"name":"Canary Islands"},,...] } "name": "Spain", "code": "ES", "population": 46538422,.... {"name": "Andalucia"}, {"name": "Aragon"}, {"name":"Canary Islands"},...]
  • 53. 53 Extend the matching strategy: Semantic, Non-functional properties Matching strategy Support data modification operations Data modification Support other formats: GraphQL, OpenAPI 3Other formats APIComposer F u t u r e w o r k
  • 54. 54 Side effects O p e n A P It o U M L Visualization of OpenAPI definitions as UML Class diagrams 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.
  • 55. 55 Side effects O p e n A P It o U M L
  • 58. 58 Publications ICWE 2018 OData profile ICWE 2017 SAC 2016 ECFMA 2017 RCIS 2018 ESOCC 2018 EDOC 2018 International conferences (full research papers) 4 International conferences (short and demo papers) 3 National conferences 1
  • 59. 59 A case study to validate the contributions of the thesis in a single industrial scenario All-in-One Smart cities are a potential direction to apply to the work presented in this thesis Smart cities Extend our work to support non-functional requirements Non-functional requirements Extend our work to support GraphQLGraphQL Future work
  • 60. Thank you! Model-driven Round-trip Engineering of REST APIs Hamza Ed-douibi Supervised by : Jordi Cabot and Javier Luis Cánovas Izquierdo