forked from loafle/openapi-generator-original
go: minor refactoring (#16508)
This commit is contained in:
parent
b34a10aee7
commit
b1ec110aa3
@ -413,10 +413,7 @@ public class GoClientCodegen extends AbstractGoCodegen {
|
||||
if (ModelUtils.isStringSchema(p) || isAllOfStringSchema(p)) {
|
||||
Object defaultObj = p.getDefault();
|
||||
if (defaultObj != null) {
|
||||
if (defaultObj instanceof java.lang.String) {
|
||||
return "\"" + escapeText((String) defaultObj) + "\"";
|
||||
}
|
||||
return "\"" + escapeText(defaultObj.toString()) + "\"";
|
||||
return "\"" + escapeText(String.valueOf(defaultObj)) + "\"";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user