Bug Report Checklist
Description
- I know this issue might have been raised in the past few years for several times. I have a simple openapi spec with 1 GET point to return a
OneOf type of response. The generated code does not compile.
- My spec is return a
contact-info which is either a email or a telephoneNumber.
- The generated code for
contact-info is referring a class named OneOftelephoneNumberemail. But that class is not generated. And the maven compile failed.
- the same problem also show up for
anyOf definition.
openapi-generator version
I have tried many versions including the latest release 5.1.1 and the 5.2.0-SNAPSHOT. This error shows up on all the versions.
OpenAPI declaration file content or url
https://github.com/bnlcnd/poc-anyof-oneof/blob/main/anyof-oneof.yaml
Generation Details
the POM file can be found here
https://github.com/bnlcnd/poc-anyof-oneof/blob/main/pom.xml
Steps to reproduce
Suggest a fix
This issue seems lingering around for several years. Maybe it's time to fix it for both oneOf and anyOf.
Bug Report Checklist
Description
OneOftype of response. The generated code does not compile.contact-infowhich is either aemailor atelephoneNumber.contact-infois referring a class namedOneOftelephoneNumberemail. But that class is not generated. And the maven compile failed.anyOfdefinition.openapi-generator version
I have tried many versions including the latest release 5.1.1 and the 5.2.0-SNAPSHOT. This error shows up on all the versions.
OpenAPI declaration file content or url
https://github.com/bnlcnd/poc-anyof-oneof/blob/main/anyof-oneof.yaml
Generation Details
the POM file can be found here
https://github.com/bnlcnd/poc-anyof-oneof/blob/main/pom.xml
Steps to reproduce
Suggest a fix
This issue seems lingering around for several years. Maybe it's time to fix it for both
oneOfandanyOf.