yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App Store Connect Open API Spec Doesn't Compile

stherold opened this issue · comments

I try to use your awesome tool to generate code for the App Store Connect API OpenApi Spec. This works great and the result are 500+ Swift files. But when I cd into the output directory and build using swift build I get a ton of compilation errors, mostly like:

out/Sources/Models/App.swift:789:34: error: generic parameter 'T' could not be inferred
                    `self` = try container.decodeIfPresent("self")

My environment is as follows:

Xcode 11.7 (11E801a)
Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
Target: x86_64-apple-darwin19.6.0

The minimum swift tools version , specified in the Package.swift is set to Swift 4. Maybe there is a problem?

Any idea, since you tool would be a huge time-/lifesaver 👍

Hi @stherold. This would be a great addition to the list of fixtures we have in https://github.com/yonaskolb/SwagGen/tree/master/Specs
Would you like to open a PR that adds that and run build_specs.sh, and commit the result? Then we can look at the failures on CI and in the PR, and see if we can fix them

That would be awesome 🤩 I try to do that asap, probably this night (10-15hrs away) 👍

Alright PR created: #249

ezoic increase your site revenue