Closed kodlian closed 1 year ago
Thanks @kodlian! Could you add an example enum somewhere in the test spec and commit the diffs after running the tests https://github.com/yonaskolb/SwagGen/blob/master/Specs/TestSpec/spec.yml And also a changelog entry
Thanks for asking me to add a test JSON spec file @yonaskolb. It makes me realize that the JSON dictionary I was using was not correct as the testing one was working. This was fixing it, just not in the right place. I will close the ticket.
CodeFormatter
usesString(describing:
to generate value and case names if no enum names are provided. This results in wrong integer enumations that do not compile:Take the following spec
Currently, it will generate:
This MR fixes the issue by leveraging the
stringValue
property fromNSNumber
.