feat: swagger定时同步

This commit is contained in:
wenyann 2021-01-26 10:31:00 +08:00
parent b3808d8c90
commit 80369f0758
1 changed files with 3 additions and 5 deletions

View File

@ -7,7 +7,6 @@ import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy;
import io.metersphere.api.dto.scenario.Body; import io.metersphere.api.dto.scenario.Body;
import io.metersphere.api.dto.scenario.KeyValue; import io.metersphere.api.dto.scenario.KeyValue;
import io.metersphere.api.dto.scenario.Scenario; import io.metersphere.api.dto.scenario.Scenario;
import io.metersphere.api.dto.scenario.request.HttpRequest;
import io.metersphere.api.dto.scenario.request.RequestType; import io.metersphere.api.dto.scenario.request.RequestType;
import io.metersphere.api.service.ApiModuleService; import io.metersphere.api.service.ApiModuleService;
import io.metersphere.base.domain.ApiModule; import io.metersphere.base.domain.ApiModule;
@ -125,7 +124,6 @@ public abstract class ApiImportAbstractParser implements ApiImportParser {
return bodyType; return bodyType;
} }
protected ApiDefinitionResult buildApiDefinition(String id, String name, String path, String method,ApiTestImportRequest importRequest) {
protected void addBodyHeader(MsHTTPSamplerProxy request) { protected void addBodyHeader(MsHTTPSamplerProxy request) {
String contentType = ""; String contentType = "";
if (request.getBody() != null && StringUtils.isNotBlank(request.getBody().getType())) { if (request.getBody() != null && StringUtils.isNotBlank(request.getBody().getType())) {
@ -153,7 +151,7 @@ public abstract class ApiImportAbstractParser implements ApiImportParser {
} }
} }
protected ApiDefinitionResult buildApiDefinition(String id, String name, String path, String method) { protected ApiDefinitionResult buildApiDefinition(String id, String name, String path, String method, ApiTestImportRequest importRequest) {
ApiDefinitionResult apiDefinition = new ApiDefinitionResult(); ApiDefinitionResult apiDefinition = new ApiDefinitionResult();
apiDefinition.setName(name); apiDefinition.setName(name);
apiDefinition.setPath(formatPath(path)); apiDefinition.setPath(formatPath(path));