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
mizuki_r
April 28, 2017
Technology
0
2.1k
APIドキュメンテーションとmockサーバ #meguroes #gotandajs
Meguro.es x Gotanda.js での発表資料です
mizuki_r
April 28, 2017
Tweet
Share
More Decks by mizuki_r
See All by mizuki_r
FrontendUp_新規事業で_Remixを採用した理由と対策.pdf
rymizuki
0
160
税理士ドットコムの 技術的挑戦 #tapioca_lt
rymizuki
0
270
PHPを始めて1年、レガシーシステムにどう向き合っているか #phpstudy
rymizuki
1
690
モダンとレガシー #gotandaem
rymizuki
0
550
Vuexに型を付けるパターンを調べた #gotandajs
rymizuki
0
120
DockerでNodeの開発は厳しいのか? #gotandajs
rymizuki
3
380
マネージャー!きみは何者だ! #gotandaem
rymizuki
0
1.7k
物語を楽しむための物語論
rymizuki
0
510
失敗と向き合う
rymizuki
0
1.4k
Other Decks in Technology
See All in Technology
AIエージェントの継続的改善のためオブザーバビリティ
pharma_x_tech
6
1.4k
Prox Industries株式会社 会社紹介資料
proxindustries
0
200
成立するElixirの再束縛(再代入)可という選択
kubell_hr
0
920
Amplifyとゼロからはじめた AIコーディング 成果と展望
mkdev10
1
360
[TechNight #90-1] 本当に使える?ZDMの新機能を実践検証してみた
oracle4engineer
PRO
3
140
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
140
25分で解説する「最小権限の原則」を実現するための AWS「ポリシー」大全 / 20250625-aws-summit-aws-policy
opelab
6
710
AIエージェント最前線! Amazon Bedrock、Amazon Q、そしてMCPを使いこなそう
minorun365
PRO
10
4k
【TiDB GAME DAY 2025】Shadowverse: Worlds Beyond にみる TiDB 活用術
cygames
0
860
強化されたAmazon Location Serviceによる新機能と開発者体験
dayjournal
2
150
白金鉱業Meetup_Vol.19_PoCはデモで語れ!顧客の本音とインサイトを引き出すソリューション構築
brainpadpr
2
490
Uniadex__公開版_20250617-AIxIoTビジネス共創ラボ_ツナガルチカラ_.pdf
iotcomjpadmin
0
150
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Embracing the Ebb and Flow
colly
86
4.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Building Applications with DynamoDB
mza
95
6.5k
The Cult of Friendly URLs
andyhume
79
6.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
4
200
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ஔ͚ͩ͘͡Ό͏ͭΒ͍
• ॊೈʹΑ͠ͳʹͯ͠΄͍͠
ご清聴ありがとうございました