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
Continuous Integrate RESTful API with Swagger-c...
Search
d_date
April 14, 2018
Programming
620
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Continuous Integrate RESTful API with Swagger-codegen
2018/4/14 Hakata.swift #1
d_date
April 14, 2018
More Decks by d_date
See All by d_date
TCA Practice in 5 min
d_date
2
1.9k
waiwai-swiftpm-part2
d_date
3
600
わいわいSwift PM part 1
d_date
2
490
What's new in Firebase 2021
d_date
2
1.6k
CI/CDをミニマルに構築する
d_date
1
630
Swift Package centered project - Build and Practice
d_date
20
17k
How to write Great Proposal
d_date
4
2.4k
Thinking about Architecture for SwiftUI
d_date
8
2.5k
Integrate your app to modern world in Niigata
d_date
0
760
Other Decks in Programming
See All in Programming
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
120
信頼性の目標を誰も求めてない
shubox
0
490
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
360
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
ALB ログから Trace を気合で繋げる技術
fohte
7
880
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
520
アクセシビリティから考える情報設計
high_g_engineer
0
290
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.4k
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
340
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
870
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
270
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.7k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Leo the Paperboy
mayatellez
8
2.2k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Documentation Writing (for coders)
carmenintech
77
5.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Transcript
Continuous Integrate RESTful API with Swagger-codegen Daiki Matsudate / @d_date
2018/04/14 / Hakata.swift #1
Daiki Matsudate @d_date
ٕज़ॻయ4 ͘-03
Thank you!!
try! Swift NYC Sep. 4th & 5th
None
None
Open Source Contributor
None
Japanese: https://note.mu/d_date/n/nbecc56fe366c English: https://medium.com/@d_date/became-a-member- of-swagger-codegen-technical- committee-4965303ba5a4
None
None
• Managing your API Spec (Open API Spec: OAS) with
yaml file • Generate client / server side code with swagger-codegen • Building Mock server
https://github.com/swagger-api/ swagger-codegen
None
https://speakerdeck.com/susieyy/ swaggerdeshi-meruapiding-yi-guan-li- tokodozienereto
Swagger-Codegen for Swift • Swift 4.1 available (still using flatMap:
not compactMap:) • Codable protocol • Required / Optional with Swift.Optional • API Client with Alamofire • RxSwift / PromiseKit / Default interface
None
https://speakerdeck.com/d_date/ swagger-codegen-karatiao-meru- swift4
Swagger-codegen x Circle CI
swagger-api / swagger-codegen swagger.yaml swagger-codegen -l swift4 -i swagger.yaml
Automation with Swagger API.framework
Automation with Swagger in Swift API.framework carthage update —-platform ios
Automation with Swagger • circleci/openjdk:8-jdk-browsers • Run java -jar swagger-codegen-cli.jar
generate -l swift4 -l swagger.yaml • Commit & push to github • Publish your code to Github Release (to make latest build) Upload client code to repo for api curl -H “Authorization: token $(GITHUB_ACCESS_TOKEN)” -X POST -d “{\”tag_name\”: \”$API_VERSION\”} -v https://github.com/repos/ #{organization name}/{repo name}/releases API.framework
Automation with Swagger • brew tap yonaskolb/XcodeGen https://github.com/yonaskolb/Xcodegen.git | brew
install XcodeGen • xcodegen • Git push • Carthage build —no-skip-current —platform iOS | Carthage archive • Sh git_release.sh github_api_token=${GITHUB_ACCESS_TOKEN} owner={owner} repo={repo name} tag=LATEST filename=API.framework.zip (to upload your framework as binary) Generating xcode project for api client API.framework
Automation with Swagger • Write github {organization name}/{repo name} in
your Cartfile • Run carthage update —platform iOS Download latest framework with Carthage API.framework
XcodeGen • Specify all your properties in your project.yml •
Targets • Dependencies (cocoapods / Carthage) • settings ( reveal on project settings) • Scheme • Build scripts • Just run `xcodegen` Build your pbxproj. with project.yml
https://github.com/yonaskolb/ Xcodegen
Recap • Managing your API spec with Swagger • Building
your API Client with Swagger-codegen • You can get Continuous Integrated API Client with Swagger-codegen x Cirlcle CI • You can get latest maintained Swagger-codegen with your PR
Thank you!!