You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java classes are not generated with extends when the OpenAPI definition declares allOf' with a $refto a model with adiscriminator` declared. This seems to be a regression.
@jeff9finger what release did this work for you in?
When I tested back to our 4.2.0 release I also did not see extend being used.
Are you sure that this was working in the way that you describe with the jersey2 library?
I am unable to verify this.
I just started recent work in 4.3.1. Am trying to move my company onto this tool. So, I'm not sure it was working, but accoring to @jimschubert, this should work.
Bug Report Checklist
Description
Java classes are not generated with
extends
when the OpenAPI definition declaresallOf' with a
$refto a model with a
discriminator` declared. This seems to be a regression.openapi-generator version
5.0.0 - master
OpenAPI declaration file content or url
Command line used for generation
java -jar openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i test.yaml --library jersey2
Steps to reproduce
Use the OpenAPI definitions above to generate a java client.
It produces stand alone classes like:
public class Organization { ... }
public class Person { ... }
public class Contact { ... }
I would expect at least the following classes to be generated with:
public class Organization extends Customer { ... }
public class Person extends Customer { ... }
public class Contact extends Party { ... }
but there is no inheritance at all.
Related issues/PRs
Suggest a fix
I have not had a change to investigate.
The text was updated successfully, but these errors were encountered: