解决多出的斜杠问题

https://github.com/metersphere/metersphere/issues/2509
This commit is contained in:
davidhhuan 2021-05-07 20:57:53 +08:00 committed by BugKing
parent e3979d0b02
commit 0cd9098151
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ public class Swagger2Parser extends SwaggerAbstractParser {
parseParameters(operation, request);
addBodyHeader(request);
if (StringUtils.isNotBlank(basePath)) {
String pathStr = basePath + apiDefinition.getPath().replaceAll("//","/");
String pathStr = (basePath + apiDefinition.getPath()).replaceAll("//","/");
apiDefinition.setPath(pathStr);
request.setPath(pathStr);
}