refactor: 统一接口定义和场景导出
This commit is contained in:
parent
fc2e3e3ca3
commit
2a7ccf7b24
|
@ -12,6 +12,8 @@ import java.util.List;
|
|||
public class ApiExportResult {
|
||||
private String projectName;
|
||||
private String protocol;
|
||||
private String projectId;
|
||||
private String version;
|
||||
private List<ApiDefinitionWithBLOBs> data;
|
||||
private List<ApiTestCaseWithBLOBs> cases;
|
||||
}
|
||||
|
|
|
@ -747,6 +747,8 @@ public class ApiDefinitionService {
|
|||
apiExportResult.setCases(apiTestCaseService.selectCasesBydApiIds(request.getIds()));
|
||||
apiExportResult.setProjectName(request.getProjectId());
|
||||
apiExportResult.setProtocol(request.getProtocol());
|
||||
apiExportResult.setProjectId(request.getProjectId());
|
||||
apiExportResult.setVersion(System.getenv("MS_VERSION"));
|
||||
return apiExportResult;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -699,6 +699,10 @@ export default {
|
|||
exportApi() {
|
||||
let param = this.buildBatchParam();
|
||||
param.protocol = this.currentProtocol;
|
||||
if (param.ids === undefined || param.ids.length < 1) {
|
||||
this.$warning(this.$t("api_test.definition.check_select"));
|
||||
return;
|
||||
}
|
||||
this.result = this.$post("/api/definition/export", param, response => {
|
||||
let obj = response.data;
|
||||
obj.protocol = this.currentProtocol;
|
||||
|
|
|
@ -533,6 +533,7 @@ export default {
|
|||
api_case_passing_rate: "Use case pass rate",
|
||||
create_tip: "Note: Detailed interface information can be filled out on the edit page",
|
||||
api_import: "Api Import",
|
||||
check_select: "Please check the API",
|
||||
select_comp: {
|
||||
no_data: "No Data",
|
||||
add_data: "Add Data"
|
||||
|
|
|
@ -533,6 +533,7 @@ export default {
|
|||
api_case_passing_rate: "用例通过率",
|
||||
create_tip: "注: 详细的接口信息可以在编辑页面填写",
|
||||
api_import: "接口导入",
|
||||
check_select: "请勾选接口",
|
||||
select_comp: {
|
||||
no_data: "无数据",
|
||||
add_data: "去添加"
|
||||
|
|
|
@ -532,6 +532,7 @@ export default {
|
|||
api_case_passing_rate: "用例通過率",
|
||||
create_tip: "註: 詳細的接口信息可以在編輯頁面填寫",
|
||||
api_import: "接口導入",
|
||||
check_select: "請勾選接口",
|
||||
select_comp: {
|
||||
no_data: "無數據",
|
||||
add_data: "去添加"
|
||||
|
|
Loading…
Reference in New Issue