yonaskolb / SwagGen

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

[Bug] Any of property is not defined swift file #255

Open syeutyu opened 3 years ago

syeutyu commented 3 years ago

I use this generator by my open API. But some errors appeared in my generated swift files.

If my open API spec included anyOf property then APIModel is not created Am i missing some right flow?

command: swaggen generate ${my open API url}
xcode version 12.2
mac os: 10.15.7
Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Target: x86_64-apple-darwin19.6.0
Open API spec

operator: {
  anyOf: [
    {
      type: "null"
    },
  ]
}

Appeared error

스크린샷 2020-11-26 오전 10 50 14