Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
APIドキュメンテーションとmockサーバ #meguroes #gotandajs
Search
mizuki_r
April 28, 2017
Technology
2.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
APIドキュメンテーションとmockサーバ #meguroes #gotandajs
Meguro.es x Gotanda.js での発表資料です
mizuki_r
April 28, 2017
Transcript
20 slides
APIドキュメンテーション と mockサーバ 2017/04/28 Meguro.es x Gotanda.js @mizuki_r
@mizuki_r • シニアフロントエンドエンジニア • エンジニア 2 #javascript #gotandajs #meguroes #perl
#kichijojipm 五反田のM社で位置ゲー開発に携わる。 エンジニアとして新卒入社して7年目に突 入。3年目くらいからフロントエンドエン ジニアを兼任。 about me こんな人です
theme
APIドキュメンテーション と mockサーバ
まあつまりは、 harikoの話です
hariko
what is hariko • JSON API Mock Server. • API-Blueprint
based.
why talk about hariko • ࠷ۙͬͯΔ • ͪΐͬͱલʹΞοϓσʔτͨ͠ • ͦ͏ݴ͑ͪΌΜͱհͯ͠ͳ͍ͳˡ
context
開発体制 ཁ݅ UI API ϞοΫ API αʔ ό ʔ ·ͣUI
ใΛཧ͠ αʔόΛ ࡞Γ UIʹө͢Δ
解決したい問題 • stubcell / json mockͳͲJSONΛஔ͚ͩ͘ • આ໌ɾυΩϡϝϯςʔγϣϯ͕ෆ • υΩϡϝϯτͱͯ͠ܗ͞Εͳ͍͠ɺͦͦಡ
Έʹ͍͘ →͜ΕAPI-Blueprint͕ղܾͯ͘͠ΕΔ
harikoで解決したい • MemberResourceͷදݱΛ࠷খͰॻ͖͍ͨ • ϖʔδϟʔͷόϦΤʔγϣϯΛදݱ͍ͨ͠ • खಈͰΞϓϦέʔγϣϯͷڍಈΛ࠶ݱ͍ͨ͠ →ͨͩͷJSONΑΓͪΐͬͱݡ͍ͨ͘͠
hariko’s power
複数のレスポンスのパターン /api/users/:idͱ͍͏API͕͋Δͱͯ͠ɺ id͕1, 2, 3, ͦͷଞͰҧ͏ϨεϙϯεΛฦ͍ͨ͠
クエリパラメータによって レスポンスを変えたい /api/items?page=1 /api/items?page=2 Ͱ10݅ͱ5݅ͰϨεϙϯεΛฦ͍ͨ͠
オンラインでデータを書き換えたい 1. POST /api/messagesʹϦΫΤετΛૹΔ 2. mockΛه͢Δ 3. GET /api/messagesΛୟ͘ͱهͨ͠σʔλ Λड͚औΕΔ
demo
まとめ
まとめ • harikoͷհͰͨ͠ • େنͳAPIΛཧ͢ΔͨΊͷॊೈੑΛ࣋ͬͨMockαʔόͰ ͢ • ҎԼͷΑ͏ͳํʹ͓͢͢ΊͰ͢ • JSONஔ͚ͩ͘͡Ό͏ͭΒ͍
• ॊೈʹΑ͠ͳʹͯ͠΄͍͠
ご清聴ありがとうございました
More Decks by mizuki_r
See All by mizuki_r
FrontendUp_新規事業で_Remixを採用した理由と対策.pdf
rymizuki
0
270
税理士ドットコムの 技術的挑戦 #tapioca_lt
rymizuki
0
330
PHPを始めて1年、レガシーシステムにどう向き合っているか #phpstudy
rymizuki
1
890
モダンとレガシー #gotandaem
rymizuki
0
620
Vuexに型を付けるパターンを調べた #gotandajs
rymizuki
0
170
DockerでNodeの開発は厳しいのか? #gotandajs
rymizuki
3
440
マネージャー!きみは何者だ! #gotandaem
rymizuki
0
1.9k
物語を楽しむための物語論
rymizuki
0
580
失敗と向き合う
rymizuki
0
1.6k
Other Decks in Technology
See All in Technology
ノードが消える前提で設計する!Karpenterで金融システムを止めないためのノウハウ大全
daitak
1
240
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
230
お風呂場をサーバルームにしよう
yusuke427
0
390
SBOM 生成ツールで 2026 Minimum Elements はどこまで満たせるのか
gokken
0
150
Taking back control of your AI development
inesmontani
PRO
0
310
Re:ゼロから始めるシェアハウスのペットな鯖
silmin_
0
270
セキュリティチームは どのコンテナイメージの脆弱性対応を優先すべきか 〜CISA新指針とSCCで作る脆弱性トリアージ〜
swdtkuy
0
300
コーディングできない僕にBobが舞い降りた
shumpei3
0
190
PHPで家庭用ゲーム機の専用コントローラーをMIDIデバイスとして扱ってみる
wind111
0
190
エンタープライズ事業未経験のデータ屋、 AI時代にN回撃沈する.pdf
ryoskdara_
0
190
Platform Engineering をベースとした Agentic Software Factory の実践
110y
3
890
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
300
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Un-Boring Meetings
codingconduct
0
510
Believing is Seeing
oripsolob
1
290
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
2
130
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
570
The Pragmatic Product Professional
lauravandoore
37
7.5k