Merge branch 'v1.4' into master

This commit is contained in:
Captain.B 2020-10-26 13:51:40 +08:00
commit a186fda880
1 changed files with 5 additions and 1 deletions

View File

@ -50,7 +50,11 @@ public class Swagger2Parser extends ApiImportAbstractParser {
for (HttpMethod method : httpMethods) {
Operation operation = operationMap.get(method);
HttpRequest request = new HttpRequest();
request.setName(operation.getOperationId());
if (StringUtils.isNotBlank(operation.getSummary())) {
request.setName(operation.getSummary());
} else {
request.setName(operation.getOperationId());
}
request.setPath(pathName);
request.setUseEnvironment(true);
request.setMethod(method.name());