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
0
580
Continuous Integrate RESTful API with Swagger-codegen
2018/4/14 Hakata.swift #1
d_date
April 14, 2018
Tweet
Share
More Decks by d_date
See All by d_date
TCA Practice in 5 min
d_date
2
1.3k
waiwai-swiftpm-part2
d_date
3
480
わいわいSwift PM part 1
d_date
2
380
What's new in Firebase 2021
d_date
2
1.4k
CI/CDをミニマルに構築する
d_date
1
550
Swift Package centered project - Build and Practice
d_date
20
13k
How to write Great Proposal
d_date
4
1.2k
Thinking about Architecture for SwiftUI
d_date
8
2.3k
Integrate your app to modern world in Niigata
d_date
0
640
Other Decks in Programming
See All in Programming
昭和の職場からアジャイルの世界へ
kumagoro95
1
400
DROBEの生成AI活用事例 with AWS
ippey
0
130
GAEログのコスト削減
mot_techtalk
0
120
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
160
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
3
1.2k
2024年のWebフロントエンドのふりかえりと2025年
sakito
3
260
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
Grafana Cloudとソラカメ
devoc
0
180
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
130
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
Conform を推す - Advocating for Conform
mizoguchicoji
3
700
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
What's in a price? How to price your products and services
michaelherold
244
12k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
560
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
The Pragmatic Product Professional
lauravandoore
32
6.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Why Our Code Smells
bkeepers
PRO
336
57k
Become a Pro
speakerdeck
PRO
26
5.1k
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!!