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
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

Easy REST with OpenAPI