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ドキュメンテーションとmockサーバ #meguroes #gotandajs
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
mizuki_r
April 28, 2017
Technology
2.2k
0
Share
APIドキュメンテーションとmockサーバ #meguroes #gotandajs
Meguro.es x Gotanda.js での発表資料です
mizuki_r
April 28, 2017
More Decks by mizuki_r
See All by mizuki_r
FrontendUp_新規事業で_Remixを採用した理由と対策.pdf
rymizuki
0
240
税理士ドットコムの 技術的挑戦 #tapioca_lt
rymizuki
0
300
PHPを始めて1年、レガシーシステムにどう向き合っているか #phpstudy
rymizuki
1
820
モダンとレガシー #gotandaem
rymizuki
0
590
Vuexに型を付けるパターンを調べた #gotandajs
rymizuki
0
150
DockerでNodeの開発は厳しいのか? #gotandajs
rymizuki
3
420
マネージャー!きみは何者だ! #gotandaem
rymizuki
0
1.8k
物語を楽しむための物語論
rymizuki
0
550
失敗と向き合う
rymizuki
0
1.5k
Other Decks in Technology
See All in Technology
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
AIエージェントの権限管理 2: データ基盤の Fine grained access control 編
ren8k
0
130
Standards et agents IA : un tour d’horizon de MCP, A2A, ADK et plus encore
glaforge
0
160
AI時代における技術的負債への取り組み
codenote
1
1.4k
Rapid Start: Faster Internet Connections, with Ruby's Help
kazuho
2
240
小説執筆のハーネスエンジニアリング
yoshitetsu
0
660
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
390
Master Dataグループ紹介資料
sansan33
PRO
1
4.6k
自立を加速させる神器 - EMOasis #11
stanby_inc
0
140
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
150
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
23k
AWS認定資格は本当に意味があるのか?
nrinetcom
PRO
2
270
Featured
See All Featured
Practical Orchestrator
shlominoach
191
11k
Google's AI Overviews - The New Search
badams
0
970
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
Building AI with AI
inesmontani
PRO
1
900
Accessibility Awareness
sabderemane
0
100
The Spectacular Lies of Maps
axbom
PRO
1
700
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
320
Building a Scalable Design System with Sketch
lauravandoore
463
34k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Design in an AI World
tapps
0
190
Transcript
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ஔ͚ͩ͘͡Ό͏ͭΒ͍
• ॊೈʹΑ͠ͳʹͯ͠΄͍͠
ご清聴ありがとうございました