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-codegen
Search
d_date
April 14, 2018
Programming
0
520
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
1
550
waiwai-swiftpm-part2
d_date
2
370
わいわいSwift PM part 1
d_date
2
330
What's new in Firebase 2021
d_date
2
1.3k
CI/CDをミニマルに構築する
d_date
1
480
Swift Package centered project - Build and Practice
d_date
20
12k
How to write Great Proposal
d_date
1
490
Thinking about Architecture for SwiftUI
d_date
8
2.1k
Integrate your app to modern world in Niigata
d_date
0
580
Other Decks in Programming
See All in Programming
元気予報
suu_mire0726
0
850
雑に思考を整理する技術と効能
konifar
51
22k
Semantic search with Django and pgvector
pauloxnet
0
220
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
170
チームでモデリングを育てるうえで 考えたこと・気づいたこと / Cultivating Modeling in Teams: Thoughts and Insights
mackey0225
7
4.1k
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
100
ゆるい個人開発のススメ
kuroppe1819
10
920
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
180
Folding Cheat Sheet #3
philipschwarz
PRO
0
110
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
350
Folding Cheat Sheet #2
philipschwarz
PRO
0
110
せっかくモデル図描くのなら、嬉しいことが多い方がいいよね!
kuboaki
1
3k
Featured
See All Featured
Become a Pro
speakerdeck
PRO
9
4.5k
Designing Experiences People Love
moore
135
23k
4 Signs Your Business is Dying
shpigford
175
21k
Code Reviewing Like a Champion
maltzj
513
39k
Rebuilding a faster, lazier Slack
samanthasiow
72
8.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
74
41k
Documentation Writing (for coders)
carmenintech
59
3.9k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
103
6.6k
Raft: Consensus for Rubyists
vanstee
130
6.2k
Side Projects
sachag
451
41k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
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!!