Open jerui1 opened 9 months ago
Reproduced on openapi-generator
v7.2.0
The issue still occurs with openapi-generator v7.3.0
The same issue also occurs with jaxrs-resteasy generator (--additional-properties=useOneOfInterfaces=true). The expected interface for the oneOf schema is not generated and a class with the same name is generated in its place. However, the classes generated for the subschemas correctly implement the intended interface.
This has been open for 6 months without any resolution, is anyone maintaining this?
This is still an issue in v7.8.0
Likely root cause issue - https://github.com/OpenAPITools/openapi-generator/issues/14166
Description
When using the useOneOfInterfaces option, the generated code does not compile.
Children classes are OK, but the generated parent is a class instead of an interface.
openapi-generator version
I've reproduces the issue with openapi-generator-maven-plugin : 7.0.1, 7.1.0 6.6.0
The option does not seem supported on previous releases.
OpenAPI declaration file content or url
OpenAPI spec :
https://gist.github.com/jerui1/da605832f67667e32a96f5c4d346640e
Sample maven project to reproduce :
openapigen-oneofbug.zip
Generation Details
mvn clean install
(I've tried using Java 17 or Java 21)