forked from loafle/openapi-generator-original
Fix issue when the swagger model contains an 'Object' class (#4695)
If the swagger model contains a class named 'Object' some mustache templates will generate non compiling **Java** code.
This commit is contained in:
parent
a956966ff2
commit
74da89c6ac
@ -47,7 +47,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
* Convert the given object to string with each line indented by 4 spaces
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
* (except the first line).
|
* (except the first line).
|
||||||
*/
|
*/
|
||||||
private String toIndentedString(Object o) {
|
private String toIndentedString(java.lang.Object o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
* Convert the given object to string with each line indented by 4 spaces
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
* (except the first line).
|
* (except the first line).
|
||||||
*/
|
*/
|
||||||
private String toIndentedString(Object o) {
|
private String toIndentedString(java.lang.Object o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
|
|||||||
* Convert the given object to string with each line indented by 4 spaces
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
* (except the first line).
|
* (except the first line).
|
||||||
*/
|
*/
|
||||||
private static String toIndentedString(Object o) {
|
private static String toIndentedString(java.lang.Object o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
* Convert the given object to string with each line indented by 4 spaces
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
* (except the first line).
|
* (except the first line).
|
||||||
*/
|
*/
|
||||||
private String toIndentedString(Object o) {
|
private String toIndentedString(java.lang.Object o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
* Convert the given object to string with each line indented by 4 spaces
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
* (except the first line).
|
* (except the first line).
|
||||||
*/
|
*/
|
||||||
private String toIndentedString(Object o) {
|
private String toIndentedString(java.lang.Object o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
* Convert the given object to string with each line indented by 4 spaces
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
* (except the first line).
|
* (except the first line).
|
||||||
*/
|
*/
|
||||||
private String toIndentedString(Object o) {
|
private String toIndentedString(java.lang.Object o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user