SlideShare uma empresa Scribd logo
1 de 18
REST Coder
Auto Generating Client Stubs and Documentation for RESTful Services
Hiranya Jayathilaka & Stratos Dimopoulos
CS263 - Spring 2013

S
What to Expect

S SOA, Web Services and APIs
S The REST ecosystem – Machine readable API

descriptions for REST
S Introduction to REST Coder – Tools and architecture
S Live Demos
S Challenges and Future Work
Service Oriented Architecture

S An architectural paradigm and a way of thinking about

designing software systems.
S A system is a structured collection of highly reusable

modules known as services.
S Language and platform neutral implementation model.
Services and APIs

S Service
S Meant to be combined with other services to build useful

applications.
S Has a well defined interface (contract).
S API
S The visible interface of a service.
SOAP vs. REST

SOAP

REST

Governed by a collection of W3C
and OASIS standards

A collection of ideas from Roy
Fielding’s Ph.D. dissertation

Standard message formats,
standard APIs, standard everything

Flexible

Heavyweight – Need a lot of code

Lightweight – Just need some
HTTP API support

Slow – Consumes resources

Fast – Conservative

Decaying popularity

Everybody loves REST 
REST in Peace SOAP!
Service/API Ecosystem for
REST
Ecosystem Feature

State-of-the-Art

Service development

Mature

Lifecycle management

Emerging

Subscription management, SLA
enforcement and monitoring

Emerging

Machine readable API descriptions

No widely accepted standards

API documentation

Manual

API discovery

Manual

API consumption

Manual

Automated reasoning

Existing methods too complex for
widespread use
Our Approach

S A simple, structured, machine-readable API description

language.
S A collection of tools for auto-generating and processing

API descriptions.
S Automated API discovery and engagement
S Automated API consumption
S Automated API doc generation
S Automated reasoning about APIs
API Description Language

S Simple, structured language based on JSON
S Captures –
S Functional properties (resources, operations, security

constraints etc.)
S Data models (simple structured type system inspired by
Thrift)
S Non-functional properties (licensing information, SLA details,
ownership details etc.)
REST Coder

S A set of tools for auto generating API docs and client

stubs from a given API description.
S Three main components/tools.
S HTML/JavaScript code generator
S Sphinx API doc generator

S Python client stub generator
HTML/JS Code Generator

S Given an input API description, generates a set of API

docs in HTML format.
S Augments HTML-based API docs with JS/JQuery code to

invoke the remote API on-line.
System Architecture

JSON
Description

Code Generator
(Java/Velocity)

API Documentation/
Client
(HTML/JQuery)

Reverse Proxy
(NodeJS /
Express)

REST API
(Tomcat)
Sphinx API Doc Generator

S Given an input API description, generates a collection of

reStructred text (.rst) files and compiles them using
Sphinx.
S Generates an index page and a separate page for each

resource and user-defined data type in the API
description.
S Automatically creates links between pages to provide

easy navigation between related topics.
Python Client Stub Generator

S Given an input API description, generates a Python (2.7)

module that can be used as a client stub (proxy) to
consume the API.
S Useful in developing desktop apps, command-line tools,

webapps and mashups in Python.
S Generates a separate Python class for each resource in

the API description.
S Convert API docs into Python docstrings.
Challenges

S

Recursive type system is easy to understand but complex to generate
code for.

S

Required vs. optional parameters.

S

Avoiding the generation of boilerplate code – Reusing generated code.

S

Handling different media types.

S

Managing symbols and identifiers during the code generation.

S

Handling incomplete API descriptions.

S

Cross-site API calls in JavaScript (Same origin policy)
Future Work

S Auto generating code for secured (OAuth, BasicAuth)

APIs.
S Auto generating test cases.
S Generating code that validates/enforces documented API

pre-conditions and post-conditions (contracts).
S Support for more media types.
S Auto generating entire apps/mashups.
Questions?
References

S

M. Maleshkova, C. Pedrinaci, and J. Domingue, “Investigating Web APIs on the
World Wide Web”, European Conference on Web Services (ECOWS)

S

D. Bianchini, V. De Antonellis, and M. Melchiori, “Semantics-enabled web APIs
selection pattern”, In Proceedings of the 15th Symposium on International Database
Engineering & Applications (IDEAS '11)

S

Jacek Kopecký, Karthik Gomadam, and Tomas Vitvar. 2008, “hRESTS: An HTML
Microformat for Describing RESTful Web Services” In Proceedings of the 2008
IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent
Technology

S

WADL - http://www.w3.org/Submission/wadl/

S

Swagger - https://developers.helloreverb.com/swagger/

Mais conteúdo relacionado

Mais procurados

Liferay as a headless platform
Liferay as a headless platform  Liferay as a headless platform
Liferay as a headless platform Jorge Ferrer
 
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsThe liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsJorge Ferrer
 
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...apidays
 
Building APIs with Node.js and Swagger
Building APIs with Node.js and SwaggerBuilding APIs with Node.js and Swagger
Building APIs with Node.js and SwaggerJeremy Whitlock
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Implement Web API with Swagger
Implement Web API with SwaggerImplement Web API with Swagger
Implement Web API with SwaggerJiang Wu
 
Ibm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshopIbm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshopShubhra Kar
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with PythonTakuro Wada
 
apidays LIVE London 2021 - Consumer-first APIs in Open Banking by Chris Dudle...
apidays LIVE London 2021 - Consumer-first APIs in Open Banking by Chris Dudle...apidays LIVE London 2021 - Consumer-first APIs in Open Banking by Chris Dudle...
apidays LIVE London 2021 - Consumer-first APIs in Open Banking by Chris Dudle...apidays
 
APIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenAPIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenMichael Petychakis
 
Rest API with Swagger and NodeJS
Rest API with Swagger and NodeJSRest API with Swagger and NodeJS
Rest API with Swagger and NodeJSLuigi Saetta
 
Swagger for-your-api
Swagger for-your-apiSwagger for-your-api
Swagger for-your-apiTony Tam
 
Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)Tony Tam
 
Publishing strategies for API documentation
Publishing strategies for API documentationPublishing strategies for API documentation
Publishing strategies for API documentationTom Johnson
 
APIs And SDKs Breaking Into And Succeeding In A Specialty Market
APIs And SDKs  Breaking Into And Succeeding In A Specialty MarketAPIs And SDKs  Breaking Into And Succeeding In A Specialty Market
APIs And SDKs Breaking Into And Succeeding In A Specialty MarketBill Dubie
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing SwaggerTony Tam
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description LanguagesAkana
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecAdam Paxton
 

Mais procurados (19)

Liferay as a headless platform
Liferay as a headless platform  Liferay as a headless platform
Liferay as a headless platform
 
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsThe liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
 
What is Swagger?
What is Swagger?What is Swagger?
What is Swagger?
 
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
 
Building APIs with Node.js and Swagger
Building APIs with Node.js and SwaggerBuilding APIs with Node.js and Swagger
Building APIs with Node.js and Swagger
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Implement Web API with Swagger
Implement Web API with SwaggerImplement Web API with Swagger
Implement Web API with Swagger
 
Ibm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshopIbm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshop
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with Python
 
apidays LIVE London 2021 - Consumer-first APIs in Open Banking by Chris Dudle...
apidays LIVE London 2021 - Consumer-first APIs in Open Banking by Chris Dudle...apidays LIVE London 2021 - Consumer-first APIs in Open Banking by Chris Dudle...
apidays LIVE London 2021 - Consumer-first APIs in Open Banking by Chris Dudle...
 
APIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenAPIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in Heaven
 
Rest API with Swagger and NodeJS
Rest API with Swagger and NodeJSRest API with Swagger and NodeJS
Rest API with Swagger and NodeJS
 
Swagger for-your-api
Swagger for-your-apiSwagger for-your-api
Swagger for-your-api
 
Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)
 
Publishing strategies for API documentation
Publishing strategies for API documentationPublishing strategies for API documentation
Publishing strategies for API documentation
 
APIs And SDKs Breaking Into And Succeeding In A Specialty Market
APIs And SDKs  Breaking Into And Succeeding In A Specialty MarketAPIs And SDKs  Breaking Into And Succeeding In A Specialty Market
APIs And SDKs Breaking Into And Succeeding In A Specialty Market
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing Swagger
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 

Destaque

Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment WorkshopAtlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment WorkshopMatt Ray
 
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)open-e
 
Red Hat Storage Day Seattle: Why Software-Defined Storage Matters
Red Hat Storage Day Seattle: Why Software-Defined Storage MattersRed Hat Storage Day Seattle: Why Software-Defined Storage Matters
Red Hat Storage Day Seattle: Why Software-Defined Storage MattersRed_Hat_Storage
 
Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...
Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...
Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...Ontico
 
OpenStack Deployment with Chef Workshop
OpenStack Deployment with Chef WorkshopOpenStack Deployment with Chef Workshop
OpenStack Deployment with Chef WorkshopMatt Ray
 
Event Driven Architecture - MeshU - Ilya Grigorik
Event Driven Architecture - MeshU - Ilya GrigorikEvent Driven Architecture - MeshU - Ilya Grigorik
Event Driven Architecture - MeshU - Ilya GrigorikIlya Grigorik
 
Best Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatBest Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatEthan Lynn
 
Swift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex YangSwift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex YangHui Cheng
 
TXLF: Automated Deployment of OpenStack with Chef
TXLF: Automated Deployment of OpenStack with ChefTXLF: Automated Deployment of OpenStack with Chef
TXLF: Automated Deployment of OpenStack with ChefMatt Ray
 
React.jsでHowManyPizza
React.jsでHowManyPizzaReact.jsでHowManyPizza
React.jsでHowManyPizza松田 千尋
 
Are We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack DeploymentAre We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack DeploymentKen Pepple
 
Building RESTful APIs
Building RESTful APIsBuilding RESTful APIs
Building RESTful APIsSilota Inc.
 
Software Defined presentation
Software Defined presentationSoftware Defined presentation
Software Defined presentationJohn Rhodes
 
Mirantis open stack deployment automation
Mirantis open stack deployment automationMirantis open stack deployment automation
Mirantis open stack deployment automationWooKyun Jeon
 
Microservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerMicroservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerDhilipsiva DS
 
"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011
"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011
"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011Stephen Foskett
 
Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis OpenStack-DC-Meetup 17 Sept 2014Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis OpenStack-DC-Meetup 17 Sept 2014Mirantis
 

Destaque (20)

Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment WorkshopAtlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
 
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
 
Pycon 2008: Python Command-line Tools *Nix
Pycon 2008:  Python Command-line Tools *NixPycon 2008:  Python Command-line Tools *Nix
Pycon 2008: Python Command-line Tools *Nix
 
Red Hat Storage Day Seattle: Why Software-Defined Storage Matters
Red Hat Storage Day Seattle: Why Software-Defined Storage MattersRed Hat Storage Day Seattle: Why Software-Defined Storage Matters
Red Hat Storage Day Seattle: Why Software-Defined Storage Matters
 
Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...
Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...
Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...
 
OpenStack Deployment with Chef Workshop
OpenStack Deployment with Chef WorkshopOpenStack Deployment with Chef Workshop
OpenStack Deployment with Chef Workshop
 
Event Driven Architecture - MeshU - Ilya Grigorik
Event Driven Architecture - MeshU - Ilya GrigorikEvent Driven Architecture - MeshU - Ilya Grigorik
Event Driven Architecture - MeshU - Ilya Grigorik
 
Introduction to Apache Synapse
Introduction to Apache SynapseIntroduction to Apache Synapse
Introduction to Apache Synapse
 
Best Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatBest Practice for Deploying Application with Heat
Best Practice for Deploying Application with Heat
 
Swift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex YangSwift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex Yang
 
TXLF: Automated Deployment of OpenStack with Chef
TXLF: Automated Deployment of OpenStack with ChefTXLF: Automated Deployment of OpenStack with Chef
TXLF: Automated Deployment of OpenStack with Chef
 
React.jsでHowManyPizza
React.jsでHowManyPizzaReact.jsでHowManyPizza
React.jsでHowManyPizza
 
Are We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack DeploymentAre We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack Deployment
 
Building RESTful APIs
Building RESTful APIsBuilding RESTful APIs
Building RESTful APIs
 
Software Defined presentation
Software Defined presentationSoftware Defined presentation
Software Defined presentation
 
Mirantis open stack deployment automation
Mirantis open stack deployment automationMirantis open stack deployment automation
Mirantis open stack deployment automation
 
Microservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerMicroservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and Docker
 
Core Concept: Software Defined Everything
Core Concept: Software Defined EverythingCore Concept: Software Defined Everything
Core Concept: Software Defined Everything
 
"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011
"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011
"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011
 
Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis OpenStack-DC-Meetup 17 Sept 2014Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis OpenStack-DC-Meetup 17 Sept 2014
 

Semelhante a REST Coder: Auto Generating Client Stubs and Documentation for REST APIs

NodeJS - Creating a Restful API
NodeJS - Creating a Restful APINodeJS - Creating a Restful API
NodeJS - Creating a Restful APIRogério Rodrigues
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST APIstephenbhadran
 
Full Stack Developer
Full Stack DeveloperFull Stack Developer
Full Stack DeveloperAkbar Uddin
 
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 WritersLukas Leander Rosenstock
 
Specification-driven API Design with OpenAPI
Specification-driven API Design with OpenAPISpecification-driven API Design with OpenAPI
Specification-driven API Design with OpenAPILukas Leander Rosenstock
 
APIdays Paris 2014 - The State of Web API Languages
APIdays Paris 2014 - The State of Web API LanguagesAPIdays Paris 2014 - The State of Web API Languages
APIdays Paris 2014 - The State of Web API LanguagesRestlet
 
AWS API Framework Overview
AWS API Framework OverviewAWS API Framework Overview
AWS API Framework OverviewAPI Talent
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Kashif Imran
 
Past, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web AppsPast, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web AppsSmartBear
 
Representational State Transfer
Representational State TransferRepresentational State Transfer
Representational State TransferAlexei Skachykhin
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopJimmy Guerrero
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
[WSO2 Integration Summit Nairobi 2019] Role of Integration in an API Driven W...
[WSO2 Integration Summit Nairobi 2019] Role of Integration in an API Driven W...[WSO2 Integration Summit Nairobi 2019] Role of Integration in an API Driven W...
[WSO2 Integration Summit Nairobi 2019] Role of Integration in an API Driven W...WSO2
 
2015-05-19-resume
2015-05-19-resume2015-05-19-resume
2015-05-19-resumeLee Norris
 
GraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend DevsGraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend DevsSashko Stubailo
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIsKnoldus Inc.
 

Semelhante a REST Coder: Auto Generating Client Stubs and Documentation for REST APIs (20)

NodeJS - Creating a Restful API
NodeJS - Creating a Restful APINodeJS - Creating a Restful API
NodeJS - Creating a Restful API
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
 
Full Stack Developer
Full Stack DeveloperFull Stack Developer
Full Stack Developer
 
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
 
Specification-driven API Design with OpenAPI
Specification-driven API Design with OpenAPISpecification-driven API Design with OpenAPI
Specification-driven API Design with OpenAPI
 
Visual studio
Visual studioVisual studio
Visual studio
 
APIdays Paris 2014 - The State of Web API Languages
APIdays Paris 2014 - The State of Web API LanguagesAPIdays Paris 2014 - The State of Web API Languages
APIdays Paris 2014 - The State of Web API Languages
 
AWS API Framework Overview
AWS API Framework OverviewAWS API Framework Overview
AWS API Framework Overview
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365
 
Past, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web AppsPast, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web Apps
 
Representational State Transfer
Representational State TransferRepresentational State Transfer
Representational State Transfer
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
[WSO2 Integration Summit Nairobi 2019] Role of Integration in an API Driven W...
[WSO2 Integration Summit Nairobi 2019] Role of Integration in an API Driven W...[WSO2 Integration Summit Nairobi 2019] Role of Integration in an API Driven W...
[WSO2 Integration Summit Nairobi 2019] Role of Integration in an API Driven W...
 
2015-05-19-resume
2015-05-19-resume2015-05-19-resume
2015-05-19-resume
 
GraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend DevsGraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend Devs
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Asp.net0
Asp.net0Asp.net0
Asp.net0
 
Web Dev 21-01-2024.pptx
Web Dev 21-01-2024.pptxWeb Dev 21-01-2024.pptx
Web Dev 21-01-2024.pptx
 

Último

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Último (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

REST Coder: Auto Generating Client Stubs and Documentation for REST APIs

  • 1. REST Coder Auto Generating Client Stubs and Documentation for RESTful Services Hiranya Jayathilaka & Stratos Dimopoulos CS263 - Spring 2013 S
  • 2. What to Expect S SOA, Web Services and APIs S The REST ecosystem – Machine readable API descriptions for REST S Introduction to REST Coder – Tools and architecture S Live Demos S Challenges and Future Work
  • 3. Service Oriented Architecture S An architectural paradigm and a way of thinking about designing software systems. S A system is a structured collection of highly reusable modules known as services. S Language and platform neutral implementation model.
  • 4. Services and APIs S Service S Meant to be combined with other services to build useful applications. S Has a well defined interface (contract). S API S The visible interface of a service.
  • 5. SOAP vs. REST SOAP REST Governed by a collection of W3C and OASIS standards A collection of ideas from Roy Fielding’s Ph.D. dissertation Standard message formats, standard APIs, standard everything Flexible Heavyweight – Need a lot of code Lightweight – Just need some HTTP API support Slow – Consumes resources Fast – Conservative Decaying popularity Everybody loves REST 
  • 7. Service/API Ecosystem for REST Ecosystem Feature State-of-the-Art Service development Mature Lifecycle management Emerging Subscription management, SLA enforcement and monitoring Emerging Machine readable API descriptions No widely accepted standards API documentation Manual API discovery Manual API consumption Manual Automated reasoning Existing methods too complex for widespread use
  • 8. Our Approach S A simple, structured, machine-readable API description language. S A collection of tools for auto-generating and processing API descriptions. S Automated API discovery and engagement S Automated API consumption S Automated API doc generation S Automated reasoning about APIs
  • 9. API Description Language S Simple, structured language based on JSON S Captures – S Functional properties (resources, operations, security constraints etc.) S Data models (simple structured type system inspired by Thrift) S Non-functional properties (licensing information, SLA details, ownership details etc.)
  • 10. REST Coder S A set of tools for auto generating API docs and client stubs from a given API description. S Three main components/tools. S HTML/JavaScript code generator S Sphinx API doc generator S Python client stub generator
  • 11. HTML/JS Code Generator S Given an input API description, generates a set of API docs in HTML format. S Augments HTML-based API docs with JS/JQuery code to invoke the remote API on-line.
  • 12. System Architecture JSON Description Code Generator (Java/Velocity) API Documentation/ Client (HTML/JQuery) Reverse Proxy (NodeJS / Express) REST API (Tomcat)
  • 13. Sphinx API Doc Generator S Given an input API description, generates a collection of reStructred text (.rst) files and compiles them using Sphinx. S Generates an index page and a separate page for each resource and user-defined data type in the API description. S Automatically creates links between pages to provide easy navigation between related topics.
  • 14. Python Client Stub Generator S Given an input API description, generates a Python (2.7) module that can be used as a client stub (proxy) to consume the API. S Useful in developing desktop apps, command-line tools, webapps and mashups in Python. S Generates a separate Python class for each resource in the API description. S Convert API docs into Python docstrings.
  • 15. Challenges S Recursive type system is easy to understand but complex to generate code for. S Required vs. optional parameters. S Avoiding the generation of boilerplate code – Reusing generated code. S Handling different media types. S Managing symbols and identifiers during the code generation. S Handling incomplete API descriptions. S Cross-site API calls in JavaScript (Same origin policy)
  • 16. Future Work S Auto generating code for secured (OAuth, BasicAuth) APIs. S Auto generating test cases. S Generating code that validates/enforces documented API pre-conditions and post-conditions (contracts). S Support for more media types. S Auto generating entire apps/mashups.
  • 18. References S M. Maleshkova, C. Pedrinaci, and J. Domingue, “Investigating Web APIs on the World Wide Web”, European Conference on Web Services (ECOWS) S D. Bianchini, V. De Antonellis, and M. Melchiori, “Semantics-enabled web APIs selection pattern”, In Proceedings of the 15th Symposium on International Database Engineering & Applications (IDEAS '11) S Jacek Kopecký, Karthik Gomadam, and Tomas Vitvar. 2008, “hRESTS: An HTML Microformat for Describing RESTful Web Services” In Proceedings of the 2008 IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology S WADL - http://www.w3.org/Submission/wadl/ S Swagger - https://developers.helloreverb.com/swagger/