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
610
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.8k
waiwai-swiftpm-part2
d_date
3
560
わいわいSwift PM part 1
d_date
2
450
What's new in Firebase 2021
d_date
2
1.6k
CI/CDをミニマルに構築する
d_date
1
620
Swift Package centered project - Build and Practice
d_date
20
16k
How to write Great Proposal
d_date
4
1.9k
Thinking about Architecture for SwiftUI
d_date
8
2.5k
Integrate your app to modern world in Niigata
d_date
0
720
Other Decks in Programming
See All in Programming
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
540
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
170
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
110
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
130
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
160
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
220
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
Ruby x Terminal
a_matsuda
7
590
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
140
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.6k
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
840
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
330
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
320
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
630
Design in an AI World
tapps
0
170
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
120
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
480
The Cult of Friendly URLs
andyhume
79
6.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Test your architecture with Archunit
thirion
1
2.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
470
We Have a Design System, Now What?
morganepeng
55
8k
How to Talk to Developers About Accessibility
jct
2
150
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!!