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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
More Decks by mizuki_r
See All by mizuki_r
FrontendUp_新規事業で_Remixを採用した理由と対策.pdf
rymizuki
0
250
税理士ドットコムの 技術的挑戦 #tapioca_lt
rymizuki
0
310
PHPを始めて1年、レガシーシステムにどう向き合っているか #phpstudy
rymizuki
1
830
モダンとレガシー #gotandaem
rymizuki
0
590
Vuexに型を付けるパターンを調べた #gotandajs
rymizuki
0
150
DockerでNodeの開発は厳しいのか? #gotandajs
rymizuki
3
420
マネージャー!きみは何者だ! #gotandaem
rymizuki
0
1.8k
物語を楽しむための物語論
rymizuki
0
560
失敗と向き合う
rymizuki
0
1.5k
Other Decks in Technology
See All in Technology
ITエンジニアを取り巻く環境とキャリアパス / A career path for Japanese IT engineers
takatama
4
1.8k
"何を作るか"を任される エンジニアは、どう育つのか
yutaokafuji
1
270
Claude Code の Sandbox 機能を Anthropic Sandbox Runtime(srt) で試そう!/lets-play-anthropic-sandbox-runtime
tomoki10
1
290
ブロックチェーン / Blockchain
ks91
PRO
0
110
OCI Oracle AI Database Services新機能アップデート(2026/03-2026/05)
oracle4engineer
PRO
0
310
AI Adaptable なテストを整える工夫 / Ways to Make Your Tests AI-Adaptable
bitkey
PRO
3
230
AI Testing Talks: Challenges of Applying AI in Software Testing: From Hype to Practical Use
exactpro
PRO
1
140
「速く作る」から「正しく作る」へ ─ 生成AI時代の開発フロー改革の ロードマップと実行 ─
starfish719
0
9.2k
noUncheckedIndexedAccess、3時間、1万円。 / noUncheckedIndexedAccess, 3 Hours, 10,000 JPY.
kaonavi
1
340
MCP Appsを作ってみよう
iwamot
PRO
4
250
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
280
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
0
1k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
160
Crafting Experiences
bethany
1
170
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
The SEO Collaboration Effect
kristinabergwall1
1
480
How to make the Groovebox
asonas
2
2.2k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
280
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
200
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
330
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
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ஔ͚ͩ͘͡Ό͏ͭΒ͍
• ॊೈʹΑ͠ͳʹͯ͠΄͍͠
ご清聴ありがとうございました