mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-01 19:49:10 +08:00
fix: swagger 名称为空报错
This commit is contained in:
parent
af8b6e4ae0
commit
e927b1e6ac
@ -97,8 +97,10 @@ public class Swagger2Parser extends ApiImportAbstractParser {
|
||||
String name = "";
|
||||
if (StringUtils.isNotBlank(operation.getSummary())) {
|
||||
name = operation.getSummary();
|
||||
} else {
|
||||
} else if (StringUtils.isNotBlank(operation.getOperationId())) {
|
||||
name = operation.getOperationId();
|
||||
} else {
|
||||
name = path;
|
||||
}
|
||||
return buildApiDefinition(id, name, path, method);
|
||||
}
|
||||
|
@ -129,8 +129,10 @@ public class Swagger3Parser extends ApiImportAbstractParser {
|
||||
String name = "";
|
||||
if (StringUtils.isNotBlank(operation.getSummary())) {
|
||||
name = operation.getSummary();
|
||||
} else {
|
||||
} else if (StringUtils.isNotBlank(operation.getOperationId())) {
|
||||
name = operation.getOperationId();
|
||||
} else {
|
||||
name = path;
|
||||
}
|
||||
return buildApiDefinition(id, name, path, method);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user