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
Swagger × Spring Cloud
Search
Hidetake Iwata
November 18, 2016
Technology
130
0
Share
Swagger × Spring Cloud
Spring Day 2016 Lightning Talk
http://springday2016.springframework.jp
Hidetake Iwata
November 18, 2016
More Decks by Hidetake Iwata
See All by Hidetake Iwata
Rewrite Go error handling using AST transformation
int128
1
1.4k
Cluster AutoscalerをTerraformとHelmfileでデプロイしてPrometheusでモニタリングする / Deploy the Cluster Autoscaler with Terraform and Helmfile, Monitor with Prometheus
int128
3
1.8k
認証の仕組みとclient-go credential plugin / authentication and client-go credential plugin
int128
7
7.8k
CLIでOAuth/OIDCを快適に利用する
int128
0
990
AppEngine × Spring Boot × Kotlin
int128
0
160
いつものJIRA設定
int128
1
230
Swaggerのテンプレートを魔改造した話 / Customize Swagger Templates
int128
1
5k
本番環境のリリースを自動化した話
int128
0
840
The Evolution of System Architecture
int128
0
220
Other Decks in Technology
See All in Technology
AIを活用したアクセシビリティ改善フロー
degudegu2510
1
170
インフラを Excel 管理していた組織が 3 ヶ月で IaC 化されるまで
geekplus_tech
3
180
幾億の壁を超えて/Beyond Countless Walls(JP)
ikuodanaka
0
110
え!?初参加で 300冊以上 も頒布!? これは大成功!そのはずなのに わいの財布は 赤字 の件
hellohazime
0
130
数案件を同時に進行するためのコンテキスト整理術
sutetotanuki
1
200
CC Workflow Studio
seiyakobayashi
0
290
DevOpsDays Tokyo 2026 見えない開発現場を、見える投資に変える
rojoudotcom
2
170
今年60歳のおっさんCBになる
kentapapa
1
370
ADOTで始めるサーバレスアーキテクチャのオブザーバビリティ
alchemy1115
2
280
Code Interpreter で、AIに安全に コードを書かせる。
yokomachi
0
180
終盤で崩壊させないAI駆動開発
j5ik2o
0
510
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
16k
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Context Engineering - Making Every Token Count
addyosmani
9
810
GraphQLとの向き合い方2022年版
quramy
50
14k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
520
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
710
Bash Introduction
62gerente
615
210k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
From π to Pie charts
rasagy
0
160
Transcript
Swagger × Spring Cloud @int128 (Hidetake Iwata)
None
Open API Specification / Swagger REST APIの仕様をJSONやYAMLで記述できる。 ツールセットが提供されている。 • Swagger
Editor(エディタ) • Swagger UI(APIコンソール) • Swagger Codegen(コード自動生成)
Swagger Codegen Swagger YAMLからいろんな言語のソースコードを自動生成する ツール。JARで提供されている。 • Java • Node.js •
PHP • などなど ※逆に、アノテーションからAPI仕様を生成する方法もある
Swagger Codegen × Spring 以下のテンプレートを選択できる: 1. spring-mvc ◦ APIサーバのControllerとModelが自動生成される ◦
Spring MVC 2. spring-cloud ◦ APIクライアントのClientとModelが自動生成される ◦ Spring Cloud Feign
自動生成コードの取り扱い 自動生成されたコードは変更しない。 JARに切り出して、ビルドツールで依存関係を張る。 地獄のパターン: • 自動生成されたコードをいじる(ControllerやModel) • API仕様が変わる • コードに変更を取り込む?
自動生成コード: • Controllerクラス ◦ ServiceクラスをDIしてメソッド実行 ◦ テンプレートをカスタマイズ • Modelクラス 実装コード:
• Serviceクラス:ビジネスロジックを実装 自動生成コードと実装コードをDIで分離
Gradle Swagger Generator Plugin Swagger YAMLからソースコードやドキュメントを生成 https://github.com/int128/gradle-swagger-generator-plugin
None
None
None
Thank you
2002年 2003年 2004年 2005年 Spring 1.0がリリースされたのはいつ?