Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
c21e438052
|
@ -615,12 +615,11 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
||||||
|
|
||||||
result.setOpenapi("3.0.1");
|
result.setOpenapi("3.0.1");
|
||||||
SwaggerInfo swaggerInfo = new SwaggerInfo();
|
SwaggerInfo swaggerInfo = new SwaggerInfo();
|
||||||
swaggerInfo.setVersion("1.0.1");
|
swaggerInfo.setVersion("1.0");
|
||||||
swaggerInfo.setTitle("ms-" + project.getName());
|
swaggerInfo.setTitle("ms-" + project.getName());
|
||||||
swaggerInfo.setDescription(StringUtils.EMPTY);
|
swaggerInfo.setDescription(StringUtils.EMPTY);
|
||||||
swaggerInfo.setTermsOfService(StringUtils.EMPTY);
|
swaggerInfo.setTermsOfService(StringUtils.EMPTY);
|
||||||
result.setInfo(swaggerInfo);
|
result.setInfo(swaggerInfo);
|
||||||
result.setInfo(new SwaggerInfo());
|
|
||||||
result.setServers(new ArrayList<>());
|
result.setServers(new ArrayList<>());
|
||||||
result.setTags(new ArrayList<>());
|
result.setTags(new ArrayList<>());
|
||||||
result.setComponents(JSONUtil.createObj());
|
result.setComponents(JSONUtil.createObj());
|
||||||
|
|
|
@ -153,8 +153,10 @@ export default {
|
||||||
open(currentModule) {
|
open(currentModule) {
|
||||||
this.scenarioForm = {principal: getCurrentUser().id};
|
this.scenarioForm = {principal: getCurrentUser().id};
|
||||||
this.currentModule = currentModule;
|
this.currentModule = currentModule;
|
||||||
if (this.scenarioForm.apiScenarioModuleId === undefined) {
|
if (this.scenarioForm.apiScenarioModuleId === undefined && !currentModule.id) {
|
||||||
this.scenarioForm.apiScenarioModuleId = this.moduleOptions[0].id;
|
this.scenarioForm.apiScenarioModuleId = this.moduleOptions[0].id;
|
||||||
|
} else if (currentModule.id) {
|
||||||
|
this.scenarioForm.apiScenarioModuleId = currentModule.id;
|
||||||
}
|
}
|
||||||
this.getMaintainerOptions();
|
this.getMaintainerOptions();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
|
@ -217,10 +217,12 @@ export default {
|
||||||
},
|
},
|
||||||
open(currentModule) {
|
open(currentModule) {
|
||||||
this.httpForm = {method: REQ_METHOD[0].id, userId: getCurrentUser().id};
|
this.httpForm = {method: REQ_METHOD[0].id, userId: getCurrentUser().id};
|
||||||
if (this.httpForm.moduleId === undefined) {
|
|
||||||
this.httpForm.moduleId = this.moduleOptions[0].id;
|
|
||||||
}
|
|
||||||
this.currentModule = currentModule;
|
this.currentModule = currentModule;
|
||||||
|
if (this.httpForm.moduleId === undefined && !currentModule.id) {
|
||||||
|
this.httpForm.moduleId = this.moduleOptions[0].id;
|
||||||
|
} else if (currentModule.id) {
|
||||||
|
this.httpForm.moduleId = currentModule.id;
|
||||||
|
}
|
||||||
this.getMaintainerOptions();
|
this.getMaintainerOptions();
|
||||||
this.httpVisible = true;
|
this.httpVisible = true;
|
||||||
},
|
},
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -23,7 +23,7 @@
|
||||||
<spring-cloud.version>2021.0.4</spring-cloud.version>
|
<spring-cloud.version>2021.0.4</spring-cloud.version>
|
||||||
<dubbo.version>2.7.15</dubbo.version>
|
<dubbo.version>2.7.15</dubbo.version>
|
||||||
<flyway.version>7.15.0</flyway.version>
|
<flyway.version>7.15.0</flyway.version>
|
||||||
<shiro.version>1.9.1</shiro.version>
|
<shiro.version>1.10.0</shiro.version>
|
||||||
<mssql-jdbc.version>7.4.1.jre8</mssql-jdbc.version>
|
<mssql-jdbc.version>7.4.1.jre8</mssql-jdbc.version>
|
||||||
<postgresql.version>42.3.2</postgresql.version>
|
<postgresql.version>42.3.2</postgresql.version>
|
||||||
<java-websocket.version>1.5.3</java-websocket.version>
|
<java-websocket.version>1.5.3</java-websocket.version>
|
||||||
|
|
|
@ -248,7 +248,7 @@ public class TestCaseController {
|
||||||
testCaseService.testCaseTemplateExport(projectId, importType, response);
|
testCaseService.testCaseTemplateExport(projectId, importType, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export/xmindTemplate/{projectId}/{importType}")
|
@GetMapping("/export/xmind/template/{projectId}/{importType}")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EXPORT)
|
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EXPORT)
|
||||||
public void xmindTemplate(@PathVariable String projectId, @PathVariable String importType, HttpServletResponse response) {
|
public void xmindTemplate(@PathVariable String projectId, @PathVariable String importType, HttpServletResponse response) {
|
||||||
testCaseService.testCaseXmindTemplateExport(projectId, importType, response);
|
testCaseService.testCaseXmindTemplateExport(projectId, importType, response);
|
||||||
|
|
|
@ -1362,7 +1362,7 @@ public class TestCaseService {
|
||||||
// 发送给客户端的数据
|
// 发送给客户端的数据
|
||||||
byte[] buff = new byte[1024];
|
byte[] buff = new byte[1024];
|
||||||
try (OutputStream outputStream = res.getOutputStream();
|
try (OutputStream outputStream = res.getOutputStream();
|
||||||
BufferedInputStream bis = new BufferedInputStream(TestCaseService.class.getResourceAsStream("/io/metersphere/xmind/template/" + fileName));) {
|
BufferedInputStream bis = new BufferedInputStream(TestCaseService.class.getClassLoader().getResourceAsStream("xmind/" + fileName));) {
|
||||||
int i = bis.read(buff);
|
int i = bis.read(buff);
|
||||||
while (i != -1) {
|
while (i != -1) {
|
||||||
outputStream.write(buff, 0, buff.length);
|
outputStream.write(buff, 0, buff.length);
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -157,7 +157,7 @@ export default {
|
||||||
downloadXmindTemplate() {
|
downloadXmindTemplate() {
|
||||||
let uri = '/test/case/export/template/';
|
let uri = '/test/case/export/template/';
|
||||||
if (this.isXmind) {
|
if (this.isXmind) {
|
||||||
uri = '/test/case/export/xmindTemplate/';
|
uri = '/test/case/export/xmind/template/';
|
||||||
}
|
}
|
||||||
this.$fileDownload(uri + getCurrentProjectID() + '/' + this.importType);
|
this.$fileDownload(uri + getCurrentProjectID() + '/' + this.importType);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue