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
600
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.6k
waiwai-swiftpm-part2
d_date
3
530
わいわいSwift PM part 1
d_date
2
420
What's new in Firebase 2021
d_date
2
1.5k
CI/CDをミニマルに構築する
d_date
1
580
Swift Package centered project - Build and Practice
d_date
20
15k
How to write Great Proposal
d_date
4
1.7k
Thinking about Architecture for SwiftUI
d_date
8
2.4k
Integrate your app to modern world in Niigata
d_date
0
690
Other Decks in Programming
See All in Programming
旅行プランAIエージェント開発の裏側
ippo012
2
900
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
290
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.3k
ソフトウェアテスト徹底指南書の紹介
goyoki
1
150
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
230
Deep Dive into Kotlin Flow
jmatsu
1
320
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
440
速いWebフレームワークを作る
yusukebe
5
1.7k
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
220
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Into the Great Unknown - MozCon
thekraken
40
2k
It's Worth the Effort
3n
187
28k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Optimizing for Happiness
mojombo
379
70k
For a Future-Friendly Web
brad_frost
180
9.9k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
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!!