Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Stop writing your API clients by hand
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Alan Cooke
August 22, 2018
Programming
1
130
Stop writing your API clients by hand
Introduction and demo of how one can use the Open API Spec to generate API clients on demand.
Alan Cooke
August 22, 2018
Tweet
Share
More Decks by Alan Cooke
See All by Alan Cooke
Robots, the best testers your will ever ever build
a1cooke
0
49
ROBOTS, THE BEST TESTERS YOU WILL EVER BUILD
a1cooke
0
140
Tales of a rebuild
a1cooke
0
33
Modernizing Objective-C using Swift
a1cooke
0
91
GDG August 2015 - Retrofit + GSON
a1cooke
0
74
Other Decks in Programming
See All in Programming
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
2026年 エンジニアリング自己学習法
yumechi
0
140
AgentCoreとHuman in the Loop
har1101
5
240
今から始めるClaude Code超入門
448jp
8
8.9k
Package Management Learnings from Homebrew
mikemcquaid
0
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
590
Basic Architectures
denyspoltorak
0
680
CSC307 Lecture 03
javiergs
PRO
1
490
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
470
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
450
How STYLIGHT went responsive
nonsquared
100
6k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
330
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
The Pragmatic Product Professional
lauravandoore
37
7.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Typedesign – Prime Four
hannesfritz
42
2.9k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Transcript
Stop writing your API clients by hand
None
Alan Cooke — Senior Staff Engineer, Mobile
None
None
None
Open API aka Swagger — Open standard — Machine readable
— Language agnostic approach to API specification
None
Path specification paths: /v2/track: post: operationId: Track summary: Track tags:
- Event consumes: - application/json parameters: - name: body in: body schema: $ref: '#/definitions/Event' responses: '200': description: '' security: - X-Outbound-Key: []
Model specification definitions: User: title: User type: object properties: user_id:
type: string first_name: type: string last_name: type: string email: type: string required: - user_id
Security schemes securityDefinitions: X-Outbound-Key: name: X-Outbound-Key type: apiKey in: header
Tooling — Open source tools — Node service you run
locally or hosting service, allows you edit and mock APIs — Commercial tooling — Stoplight.io
Code generators — Open Source repo: https://github.com/swagger-api/ swagger-codegen/ Project broken
into two parts 1. Command Line Interface - swagger-codegen-cli 1. Code generator - swagger-codegen
Writing your own generator 1. Java class, allows you todo
any special pre/post processing of models 2. Collection of mustache template files used to translate model into code
public struct {{classname}}: Codable { {{#allVars}} {{#description}}/** {{description}} */ {{/description}}public
var {{name}}: {{{datatype}}} {{^required}}?{{/required}} {{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} {{/allVars}} }
None
Demo
Questions
None