yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator
MIT License
625 stars 147 forks source link

Swift 5 support #154

Closed vialyx closed 5 years ago

yonaskolb commented 5 years ago

Could you give some more information? Do you mean SwagGen itself or the generated template? Both should support Swift 5 in the latest version

Unihilator commented 5 years ago

Hi @yonaskolb ! Nice to meet you. Maybe it's related to swift package manager ver. 5. The thing is I'm getting error when I'm trying to install Swaggen version 3.0.2 and lower. Here what I'm getting:

error: dependency graph is unresolvable; found these conflicting requirements:

Dependencies:

https://github.com/yonaskolb/Stencil.git @ 0.9.0..<1.0.0 https://github.com/yonaskolb/JSONUtilities.git @ 3.3.0..<4.0.0 🌱 Encountered error during "swift package resolve". Use --verbose to see full output 🌱 Failed to resolve Swaggen 3.0.2 with SPM

Swift package version gives me Swift 5.0.0 (swiftpm-14490.62.2). I suppose this issue related to SPM 5 because my colleague have Swift 4.2.0 (swiftpm-14460.2) and it's ok with this version

yonaskolb commented 5 years ago

Yes SwagGen versions below 4.1.0 aren't compatible with Swift 5. If you're stuck on Swagger 2, I would accept a PR to upgrade the swagger_2 branch to Swift 5 and we can do a SwagGen 3.1 release. Is that what you meant as well @vialyx?

Unihilator commented 5 years ago

Thanks, will try to contribute)

haemi commented 5 years ago

Hi, I'm on SwagGen 4.1.0 - but it generates a podspec with Result as dependency in it; that shouldn't be necessary anymore, right?

yonaskolb commented 5 years ago

@haemi, no, master has result removed. I’ll do another release hopefully tonight

haemi commented 5 years ago

@yonaskolb but 4.1.0 should already support Swift 5, right? But I do get Result dependency with 4.1.0...

haemi commented 5 years ago

@yonaskolb when I generate swaggen via cloning the repo and the Xcode project, everything works as expected. But installing 4.1.0 via homebrew includes the Result.

yonaskolb commented 5 years ago

4.2.0 released which removes result. Closing this for now