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
110
1
Share
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
28
Mapa de estudo dev frontend 2023
huogerac
1
87
Documentando API no Django com django-ninja
huogerac
1
130
Um pouco da origem para chegar no WSGI
huogerac
0
51
"API Design First" pt-br
huogerac
0
280
3 Arquiteturas Django
huogerac
1
330
Django ORM vs SQLAlchemy (queries)
huogerac
0
190
Django ORM vs SQLAlchemy (intro)
huogerac
0
96
Site Imobiliario Django
huogerac
0
120
Other Decks in Programming
See All in Programming
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.4k
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
390
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
910
Tamach-sre-3_ANDPAD-shimaison93
mane12yurks38
0
240
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
Claude Code Skill入門
mayahoney
0
460
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
260
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
230
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.2k
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
230
AI 開発合宿を通して得た学び
niftycorp
PRO
0
190
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
230
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
490
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
エンジニアに許された特別な時間の終わり
watany
106
240k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Site-Speed That Sticks
csswizardry
13
1.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
880
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
240
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
320
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Automating Front-end Workflow
addyosmani
1370
200k
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