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
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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.9k
認証の仕組みとclient-go credential plugin / authentication and client-go credential plugin
int128
7
8k
CLIでOAuth/OIDCを快適に利用する
int128
0
1k
AppEngine × Spring Boot × Kotlin
int128
0
170
いつものJIRA設定
int128
1
240
Swaggerのテンプレートを魔改造した話 / Customize Swagger Templates
int128
1
5k
本番環境のリリースを自動化した話
int128
0
850
The Evolution of System Architecture
int128
0
240
Other Decks in Technology
See All in Technology
OpenID for Verifiable Credentials 実装から見えた相互運用性確保までの道のり(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
360
AI駆動開発はどこまで来たのか? ファインディの最新実態調査で読み解く現在地 Devin Con Tokyo
akiratom
4
1.9k
分割40%キーボードにスムーズに入門するには
hoto17296
1
180
markdown-poster Introduction
kazamori
0
400
Digitization部 紹介資料
sansan33
PRO
2
7.8k
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3.2k
「面白い!」を信じ抜け。激動の時代を貫く、オンリーワン・エンジニアの条件
kizawa2020
2
390
500名弱規模の組織のPythonプロジェクト(dbt) をどう管理するか?
hiracky16
0
360
信頼性はSREだけのものじゃない
hkawaras
0
300
Oracle AI Databaseデータベース・サービス: BaseDB/ExaDB-Dの可用性
oracle4engineer
PRO
1
960
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
110
dbt in Microsoft Fabric
ryomaru0825
0
300
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
830
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
500
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
180
HDC tutorial
michielstock
2
820
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
670
Thoughts on Productivity
jonyablonski
76
5.3k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
260
Why Our Code Smells
bkeepers
PRO
340
58k
Design in an AI World
tapps
1
290
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
400
How GitHub (no longer) Works
holman
316
150k
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がリリースされたのはいつ?