forked from loafle/openapi-generator-original
fix missing default values for string types (#9541)
This commit is contained in:
@@ -401,7 +401,11 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
||||
} else if (!StringUtils.isEmpty(p.get$ref())) { // model
|
||||
return toModelName(ModelUtils.getSimpleRef(p.get$ref())) + "()";
|
||||
} else if (ModelUtils.isStringSchema(p)) {
|
||||
return "\"\"";
|
||||
if (p.getDefault() == null) {
|
||||
return "\"\"";
|
||||
} else {
|
||||
return "\"" + p.getDefault().toString() + "\"";
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user