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
tsoaはいいぞ!APIドキュメントを自動生成!
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ミカイ
February 05, 2025
78
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
tsoaはいいぞ!APIドキュメントを自動生成!
shibuya.ts
2025/02/05
https://shibuya-ts.connpass.com/event/339243/
ミカイ
February 05, 2025
More Decks by ミカイ
See All by ミカイ
今からフロントエンドを0から勉強するならSvelteもありかも
junmikai
0
99
生成AI活用はHOWが大事な理由
junmikai
0
220
2025年の抱負: フリーランスから 正社員に戻るので 組織に貢献します!
junmikai
0
130
Chakra UI v3にバージョンアップしてほぼ別物になった件
junmikai
0
1.3k
LTのテーマ決めは「多数派」を意識しよう ~ LT年40回登壇した件~
junmikai
0
64
成長するには「重要 VS 緊急」を意識しよう
junmikai
0
30
LTのテーマ決めは「多数派」を意識しよう ~ LT年40回登壇した件~
junmikai
0
65
目標は「めいそう」が大事。漢字はどう書く?
junmikai
2
76
技術選定で迷ったら『日常』を思い出そう! 〜考え方の新発見〜
junmikai
0
130
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
530
Navigating Team Friction
lara
192
16k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Code Review Best Practice
trishagee
74
20k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
750
Transcript
tsoaはいいぞ! APIドキュメントを 自動生成! 三海
純(ミカイジュン)
ミカイ ジュン (三海 純) • 株式会社 ゆめみ •
趣味: もくもく会、アニメ、ラブカ(ラブライブTCG) • 好きな有名人 ◦ 後藤 ひとり ◦ 陸八魔アル ◦ 千早 愛音 ◦ 八木 唯
キャリア • 2020年 ~ 2022年: 受託企業 ◦ フロントエンドエンジニア
• 2022年 ~ 2023年: 自社開発企業 ◦ フロントエンド&バックエンドエンジニア • 2024年: フリーランス ◦ Typescriptでリプレース(技術選定)&開発 • 2025年2月 ◦ 株式会社 ゆめみ 正社員
こんなことありませんか? スキーマ(Open API仕様書) と 実際のレスポンス違うぞ・・・
そして・・・ YAMLファイルを 書いて1日が終わる日々・・・
そんなあなたにおすすめしたいのが tsoa 引用元: https://tsoa-community.github.io/docs/
tsoaとは? tsoa は、TypeScript を使用して Node.js サーバー側アプリケーションを構築するための OpenAPI コンパイラを統合したフレームワークです。
実行時に Express 、hapi、koa などのフレームワークをターゲットにすることができます。 tsoa アプリケーションはデフォルトでタイプセーフであり、実行時の検証をシームレスに処 理します。 英文引用元: https://tsoa-community.github.io/docs/introduction.html
ようするに・・・ ExpressなどのNode.jsフレームワークでコー ドを書くと スキーマを自動生成してくれる!
@Route("users") export class UsersController extends Controller { @Get("{userId}") public async
getUser( @Path() userId: number, @Query() name?: string ): Promise<User> { return new UsersService().get(userId, name); } @SuccessResponse("201", "Created") @Post() public async createUser( @Body() requestBody: UserCreationParams ): Promise<void> { this.setStatus(201); new UsersService().create(requestBody); return; } }
スキーマ自動生成! 引用元: https://tsoa-community.github.io/docs/live-reloading.html
http://localhost:3000/docs で動作確認できる! 引用元: https://tsoa-community.github.io/docs/live-reloading.html
スキーマが自動生成されることで・・・ フロントエンド側でバックエンドの スケジュールに関係なく APIを叩けるようになった!
なぜって・・・?
フロントエンドエンジニアがtsoaで バックエンド実装 すればいいじゃない! (DB通さないで適当なレスポンスを返すのもあり)
おそらく・・・ フロントエンド側も TypeScript使ってることが多いと思うので tsoaを使うことで バックエンド実装がしやすくなる
tsoaがもっと流行ると・・・ フロントエンドエンジニア バックエンドエンジニア というポジションが融合されるかも?
まとめ スキーマを書く手間を 省きたいならtsoaはいいぞ!
ご清聴ありがとうござ います!