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
Generate the model.
Compile with gradle compileJava.
Here is the compilation error I get.
Child.java:65: error: name clash: status(List<Child.StatusEnum>) in Child and status(List<Parent.StatusEnum>) in Parent have the same erasure, yet neither overrides the other
public Child status(List<StatusEnum> status) {
^
Child.java:72: error: getStatus() in Child cannot override getStatus() in Parent
public List<StatusEnum> getStatus() {
^
return type List<Child.StatusEnum> is not compatible with List<Parent.StatusEnum>
Child.java:75: error: name clash: setStatus(List<Child.StatusEnum>) in Child and setStatus(List<Parent.StatusEnum>) in Parent have the same erasure, yet neither overrides the other
public void setStatus(List<StatusEnum> status) {
^
3 errors
:compileJava FAILED
Suggest a Fix
IMHO subclasses should not redefine inherited properties, getters and setters.
The text was updated successfully, but these errors were encountered:
Description
When a parent definition contains an array of enums the generated models don't compile.
Swagger-codegen version
Latest version from master.
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Generate the model.
Compile with
gradle compileJava
.Here is the compilation error I get.
Suggest a Fix
IMHO subclasses should not redefine inherited properties, getters and setters.
The text was updated successfully, but these errors were encountered: