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
Design First Web APIs - OpenAPI 3
Search
Roger Camargo
June 02, 2021
Programming
120
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Design First Web APIs - OpenAPI 3
Design first web APIs and why Django did not help!
Roger Camargo
June 02, 2021
More Decks by Roger Camargo
See All by Roger Camargo
AWS Lambda, Rodar local, com testes, IaC e Deploy via ansible
huogerac
1
36
Mapa de estudo dev frontend 2023
huogerac
1
96
Documentando API no Django com django-ninja
huogerac
1
130
Um pouco da origem para chegar no WSGI
huogerac
0
56
"API Design First" pt-br
huogerac
0
280
3 Arquiteturas Django
huogerac
1
350
Django ORM vs SQLAlchemy (queries)
huogerac
0
210
Django ORM vs SQLAlchemy (intro)
huogerac
0
110
Site Imobiliario Django
huogerac
0
120
Other Decks in Programming
See All in Programming
テーブルをDELETEした
yuzneri
0
130
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.5k
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
230
数百円から始めるRuby電子工作
tarosay
0
140
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
420
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.8k
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
370
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
190
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
840
Cloudflare is Agents
chimame
0
140
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
680
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
120
Featured
See All Featured
The Curious Case for Waylosing
cassininazir
1
450
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
440
We Are The Robots
honzajavorek
0
290
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
What's in a price? How to price your products and services
michaelherold
247
13k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.2k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Transcript
Design first APIs and why Django did not help! by
Roger Camargo - Jun/2021
Design first APIs and why Django did not help! WEB
by Roger Camargo - Jun/2021
DISCLAIMER
Why API?
Backend Data Frontend API Code is the documentation. (It’s okay)
👉
Backend Data Client 1 API Client 2 Where is the
API documentation? 👉
Backend Data Client 1 API System A SDK Client JS
System B Client 2
Backend Data Client 1 API Client 2 System A SDK
Client JS System B Internet It can be hard to keep an API documentation updated... 👉
How to use your API? What are the endpoints? Methods?
Status codes??
How to use your API? What are the endpoints? Methods?
Status codes?? https://http.cat/
/users Code-First, Write Docs "When We Have Time" 👉 It
means "We will not write documentation"
201 API Specs/Docs
👉 It can fail to maintain parity between our documentation
and our underlying implementation API Specs/Docs
OpenAPI Specification (OAS3)
What is OAS3? - Contract for defining RESTful APIs -
Source of truth for everyone - Open source, evolving standard - Collection of tools - Language-agnostic - Readable by both humans and machines
What is OAS3? - Design by contract (YAML) (The pragmatic
programmer) - Get feedback on the API before coding - Easier to make changes - One source of truth - Generate code, mock, tests, docs etc...
Wait... Big design up front?
https://editor.swagger.io/ 👉 One source of truth
https://github.com/zalando/connexion 👉
Low coupling, High cohesion
api.py YAML service.py (CONTRACT) Routes Request validation Response validation Schema
casting FACADE API Layer Business Layer DATA ORM
Django land...
Models Managers TEMPLATE FILTERS Exception Middlewares View Exception Handlers
/polls/
Django It’s hard to produce API Guided by the YAML
contract...
However, there is django-ninja DOCS Code first, but there is
an API documentation 👉
The design first way… (Flask, Falcon etc…)
Automatic live documentation API Mock server Frontend For quick UX
validation Quick feedback Frontend TEAM Backend TEAM Real Implementation API Tests Business Tests Minimize the ReWork YAML
Design first API Links: https://swagger.io/resources/webinars/adopting-a-design-first-approach/ https://apisyouwonthate.com/blog/api-design-first-vs-code-first https://docs.djangoproject.com/en/3.2/ref/request-response/ https://www.openapis.org/ https://github.com/zalando/connexion https://http.cat/
Tools: https://editor.swagger.io/ https://stoplight.io/ Code sample: https://github.com/billcode/jarless Books https://www.goodreads.com/book/show/4099.The_Pragmatic_Programmer
THANK YOU Keep in touch @huogerac https://huogerac.hashnode.dev
[email protected]
https://speakerdeck.com/huogerac