kotlin client: add docstring to new function (#22025)

* kotlin client: add docstring

* fix
This commit is contained in:
William Cheng 2025-09-25 15:09:47 +08:00 committed by GitHub
parent 5e8dcc9f07
commit 258d971f42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -996,6 +996,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
}
return objs;
}
private Stream<List<CodegenProperty>> getAllVarProperties(CodegenModel model) {
return Stream.of(model.vars, model.allVars, model.optionalVars, model.requiredVars, model.readOnlyVars, model.readWriteVars);
}
@ -1119,6 +1120,11 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
adjustEnumRefDefault(parameter);
}
/**
* Properly set the default value for enum (reference).
*
* @param param codegen parameter
*/
private void adjustEnumRefDefault(CodegenParameter param) {
if (StringUtils.isEmpty(param.defaultValue) || !(param.isEnum || param.isEnumRef)) {
return;