Easy REST with OpenAPI

Pharo
PharoMaître de conférences at Pharo
Easy REST with
OpenAPI
Norbert Hartl

ZWEIDENKER GmbH
ZWEIDENKER GmbH
• 10 years old 

• Software solutions for mobile, web and
backend-only, too

• Pharo usage is growing steadily

• In cologne and organizing this year’s ESUG
REST
Easy REST with OpenAPI
REST
REpresentational 

State

Transfer
REST
• It uses HTTP
REST
• It uses HTTP 

• It is resource based
REST
• It uses HTTP 

• It is resource based

• It is not RPC
REST
• It uses HTTP 

• It is resource based

• It is not RPC

• It’s about hyper media
REST usually means
• Extract and validate parameters from
request

• Checking constraints of payload

• Produce documented response
JSON Schema
{

#name -> (JSONSchema string).

#age -> (JSONSchema integer) 

} asJSONSchema
OpenAPI Spec
…

	 	 "/pets/{petId}" : {

	 	 	 "get" : {

	 	 	 	 "summary" : "A call to acquire a pet",

	 	 	 	 "operationId" : "fetchPet",

	 	 	 	 "parameters" : [

	 	 	 	 	 {

	 	 	 	 	 	 "name" : "petId",

	 	 	 	 	 	 "in" : "path",

	 	 	 	 	 	 "schema" : {

	 	 	 	 	 	 	 "type" : "integer"

	 	 	 	 	 	 }

	 	 	 	 	 }

	 	 	 	 ],

	 	 	 	 "responses" : {

	 	 	 	 	 "200" : {

	 	 	 	 	 	 "content" : {

	 	 	 	 	 	 	 "application/json" : {

	 	 	 	 	 	 	 	 "schema" : …
DEMO
OpenAPI
• Specify Calls and data constraints

• Serialize to JSON spec

• Can be consumed by a client to automatically
create spec conform requests
Questions?
OpenAPI
Try
https://github.com/zweidenker/OpenAPI
Complain to
Norbert Hartl

norbert@2denker.de
1 of 16

More Related Content

Similar to Easy REST with OpenAPI(20)

Designing RESTful APIsDesigning RESTful APIs
Designing RESTful APIs
anandology750 views
RESTful API-centric UniverseRESTful API-centric Universe
RESTful API-centric Universe
Tihomir Opačić940 views
JAX-RS.nextJAX-RS.next
JAX-RS.next
Michal Gajdos1.5K views
Web Service and Mobile Integrated Day IWeb Service and Mobile Integrated Day I
Web Service and Mobile Integrated Day I
Anuchit Chalothorn2K views
Consuming RESTful services in PHPConsuming RESTful services in PHP
Consuming RESTful services in PHP
Zoran Jeremic27.9K views
Consuming RESTful Web services in PHPConsuming RESTful Web services in PHP
Consuming RESTful Web services in PHP
Zoran Jeremic22.6K views
Wp JSON API and You!Wp JSON API and You!
Wp JSON API and You!
Jamal_972960 views
Android and RESTAndroid and REST
Android and REST
Roman Woźniak19.2K views
RestRest
Rest
Nick Suwyn84 views
Web apiWeb api
Web api
Sudhakar Sharma17.8K views
FlutterでGraphQLを扱うFlutterでGraphQLを扱う
FlutterでGraphQLを扱う
IgaHironobu2.9K views
Wt unit 4 server side technology-2Wt unit 4 server side technology-2
Wt unit 4 server side technology-2
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK61 views

Recently uploaded(20)

The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)
CSUC - Consorci de Serveis Universitaris de Catalunya51 views
Green Leaf Consulting: Capabilities DeckGreen Leaf Consulting: Capabilities Deck
Green Leaf Consulting: Capabilities Deck
GreenLeafConsulting170 views
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver23 views

Easy REST with OpenAPI