Open davidsantiago opened 8 years ago
David I don't see these on the latest swift3 implementation - are you using that one or the older swift2 version?
Using the current swift2 implementation; we can't quite upgrade to swift3 yet.
if you'd like to submit a PR to that, it sounds like a reasonable answer...
@davebaird let us know if you need help with the PR.
@wing328 I'd like to obsolete any < Swift3 issues at this point so we can focus on Swift3/4
@jaz-ah totally agree it has been almost a year when Swift3 was released: https://swift.org/blog/swift-3-0-released/ and we should definitely concentrate our efforts on Swift 3.x, 4.x
I'll update the help text for swift
generator and add a FAQ on that over the weekend.
cc @jgavris @RobBlairInq @ehyche
Sounds good
UPDATE:
swift
: https://github.com/swagger-api/swagger-codegen/commit/35cf42996a363befa0b06ea8c1f2eb0906d195c3
Description
The code generated by Swagger-codegen for Swift will produce a file, AlamofireImplementations.swift, which will have a number of compile warnings, all of them the same:
There are a few different places that cause this, but here's an example:
where the warning is on "as!". Seems like an optional cast (as?) would fix these.
Swagger-codegen version
Using version 2.2.2-SNAPSHOT on master.
Swagger declaration file content or url
I don't have a swagger file to post here, because I can see already that this is invariant to the swagger declaration file. The file in question is mostly pre-defined as is in the template: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/swift/AlamofireImplementations.mustache
The warnings come on lines 172, 187, and 197.
Command line used for generation
This is run from gradle with a custom task I wrote in groovy to call the DefaultGenerator. Again, I don't believe this makes any difference.
Steps to reproduce
Generate a client library for swift and then try to compile that swift.
Related issues
My searched turned up no related issues.
Suggest a Fix
I think optional casts in the template file in question would fix it.