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
API Design with Apiary
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Z
March 17, 2016
Programming
140
1
Share
API Design with Apiary
As presentent on ofmForum.
Z
March 17, 2016
More Decks by Z
See All by Z
Agentic Commerce - arcpay.ai
zdne
1
88
APIs at the Verge of AI
zdne
0
230
Delivering APIs for AI
zdne
0
330
APIs for AI: Have we failed?
zdne
0
350
AI-enabled APIs
zdne
0
160
Autonomous Agents
zdne
0
190
API Documentation & AI
zdne
0
220
APIs in N-tier architecture
zdne
0
590
Autonomous Integration Mesh '21
zdne
0
230
Other Decks in Programming
See All in Programming
AI時代になぜ書くのか
mutsumix
0
430
継続的な負荷検証を目指して
pyama86
3
1.2k
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.8k
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
140
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
130
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
680
AWSはOSSをどのように 考えているのか?
akihisaikeda
0
130
GoogleCloudとterraform完全に理解した
terisuke
1
200
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3.2k
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
210
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
250
My daily life on Ruby
a_matsuda
3
420
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
290
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
150
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
170
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
140
So, you think you're a good person
axbom
PRO
2
2k
BBQ
matthewcrist
89
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Un-Boring Meetings
codingconduct
0
290
Transcript
API DESIGN WITH APIARY Z – @zdne Apiary.io
4 STAGES OF API MATURITY API as a by- product
of building apps API documentation generated from code Design-first API Development API Design Consistency
APIARY.IO
DESIGN-FIRST
API DESCRIPTION • API Blueprint • OpenAPI Specification (Swagger) •
Others (RAML, WADL, WSDL, Email, Word document)
API BLUEPRINT
# User [/user] ## Retrieve [GET] Retrieves the . +
Response 200 (application/json) { "name": "John" }
None
None
API LIFECYCLE
Preparation Design Development Delivery Consumption Analysis CLASSIC API LIFECYCLE
Preparation Design & Prototype Development Delivery Consumption Analysis API LIFECYCLE
WITH APIARY
Preparation 1. Define domain semantics 2. Choose architectural style 3.
Define a style guide*
Design & Prototype 1. Formalize API in an API Description
format* 2. Put API Description in a VCS 3. Circulate & Review 4. Apiary Mock Server
Develop 1. API Description in the same repository as implementation
2. Test locally 3. Test with Apiary 4. Test in CI
Deliver 1. Share VCS repository 2. Share Apiary Documentation 3.
Embed Apiary Documentation
Consume 1. Apiary Documentation 2. Apiary Mock Server 3. Documentation
Console 4. Language Examples 5. Apiary Traffic Inspector 6. Apiary Proxy
Analysis
BONUS: GOVERNANCE • Design Rules • Style Guides • Better
DX through CONSISTENCY
BONUS: MSON • Human readable data description • Reusable, format-agnostic
data modeling language • Data is your API
TRY IT NOW http://apiary.io Q&A @apiaryio
None
MIND SHIFT • Describe resource NOT representation • Define domain
semantics • Reuse common semantics • Do NOT focus on technical details • URIs • representations • schema validations
API ISN’T… • API is not pretty URLs • API
is not HTTP Verbs • API is not CRUD • API is not JSON
REST ARCHITECTURAL STYLE • Client–server • Stateless • Cacheable •
Layered system • Code on Demand (optional) • Uniform Interface • Identification of resources • Manipulation through representations • Self-descriptive messages • Hypermedia as the engine of the application state
Feedback Design Delivery Prototype Development SIMPLE API LIFECYCLE
REFERENCE • http://apiary.io • http://apiblueprint.org • https://github.com/apiaryio/mson • http://www.ics.uci.edu/~fielding/pubs/dissertation/ rest_arch_style.htm