yonaskolb / SwagGen

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

[302] Parse first GroupSchema SchemaType before trying DataType #303

Closed JanC closed 2 years ago

JanC commented 2 years ago

This PR changes the generation of composed types (oneOf, anyOf) to prefer the composed type instead of the object when both are present in the schema

See ticket for detailed description

https://github.com/yonaskolb/SwagGen/issues/302

yonaskolb commented 2 years ago

Thanks @JanC. Could you also add an example to the test spec here https://github.com/yonaskolb/SwagGen/blob/master/Specs/TestSpec/spec.yml and also a changelog entry

JanC commented 2 years ago

somehow the CI keeps on failing but I think it's unrelated to this PR.

@yonaskolb any idea why?

yonaskolb commented 2 years ago

Thanks @JanC! Yeah the CI is failing for a different reason, and I haven't had time to look into it. Not sure what's happening

JanC commented 2 years ago

thanks for merging 🙏