yonaskolb / SwagGen

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

Default language "swift" doesn't work on Linux due to case sensitivity #291

Open iainmerrick opened 2 years ago

iainmerrick commented 2 years ago

Very minor bug, just filing it so I remember to make a PR after the holidays!

I'm using SwagGen on Linux, and it doesn't run out of the box because the default language is "swift" but the template is "Swift".

yonaskolb commented 2 years ago

Thanks for the report @iainmerrick. Looking forward to the PR :)

iainmerrick commented 2 years ago

Finally started working on this. Just a couple of capitalization fixes needed, but there's some other weird problem on Linux -- discussing it on the Swift forums here: https://forums.swift.org/t/swift-run-behaving-oddly-on-linux/55046

yonaskolb commented 2 years ago

Hmm, CI is having the same issue on master https://github.com/yonaskolb/SwagGen/runs/5061627948?check_suite_focus=true

yonaskolb commented 2 years ago

Also happening locally on my Mac with Swift 5.5.2. I have no idea what's happening 🤷‍♂️

swift run swaggen generate ~/Developer/SwagGen/Specs/Petstore/spec.yml --destination ~/Developer/SwagGen/Specs/Petstore/generated/Swift

error: encountered an I/O error while reading /Users/yonas/Developer/SwagGen/Specs/Petstore/generated/Swift