fix(接口测试): 修复swagger导入时部分默认值没导入的问题

This commit is contained in:
Jianguo-Genius 2024-09-25 19:06:02 +08:00 committed by Craftsman
parent bdf5b53a0c
commit 4cd6794f3f
1 changed files with 2 additions and 0 deletions

View File

@ -673,6 +673,8 @@ public class Swagger2Parser extends SwaggerAbstractParser {
if (model != null && properties != null) {
JSONObject bodyParameters = getBodyParameters(properties, new HashSet<>());
return bodyParameters.toString();
} else {
return model.getDefaultValue() == null ? StringUtils.EMPTY : model.getDefaultValue().toString();
}
}
return StringUtils.EMPTY;