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
Expectation: Generated classes Space and Source java should extend CatalogEntity and should have properties declared in the json.
Output: It generates classes Spaces and Source and they do extend CatalogEntity but all the props are missing.
For example:-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2018-08-27T11:13:31.931-07:00[America/Los_Angeles]")
public class Space extends CatalogEntity {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Space {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
The text was updated successfully, but these errors were encountered:
jmini
changed the title
Incorrect code being generated [java]
[java] Incorrect code being generated with oneOf
Aug 28, 2018
Description
[JAVA] Incorrect code generation when subtypes are involved.
openapi-generator version
openapi-generator-cli-3.2.3
OpenAPI declaration file content or url
Command line used for generation
java -jar openapi-generator-cli-3.2.3-20180824.092221-7.jar generate -i openapi-apiresource.json -o ./gen -g java
Expectation: Generated classes Space and Source java should extend CatalogEntity and should have properties declared in the json.
Output: It generates classes Spaces and Source and they do extend CatalogEntity but all the props are missing.
For example:-
The text was updated successfully, but these errors were encountered: