fix(接口测试): metersphere 文件导入错误
This commit is contained in:
parent
45f791a4b1
commit
768ed785a9
|
@ -22,7 +22,6 @@ import lombok.Data;
|
|||
@JSONType(seeAlso = {HttpRequest.class, DubboRequest.class, SqlRequest.class, TCPRequest.class}, typeKey = "type")
|
||||
@Data
|
||||
public abstract class Request {
|
||||
private String type;
|
||||
@JSONField(ordinal = 1)
|
||||
private String id;
|
||||
@JSONField(ordinal = 2)
|
||||
|
|
|
@ -337,7 +337,9 @@ public class ApiDefinitionService {
|
|||
List<ApiDefinitionResult> data = apiImport.getData();
|
||||
HashMap<String, List<ApiDefinitionResult>> resultMap = apiImport.getResultMap();
|
||||
resultMap.forEach((module, apiDefinition) -> {
|
||||
// apiModuleService
|
||||
// apiModuleService.addNode();
|
||||
|
||||
});
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
ApiDefinitionResult item = data.get(i);
|
||||
|
|
|
@ -105,6 +105,17 @@ public class ApiModuleService {
|
|||
return node.getId();
|
||||
}
|
||||
|
||||
public ApiModule getNewModule(String name, String projectId, int level) {
|
||||
ApiModule node = new ApiModule();
|
||||
node.setCreateTime(System.currentTimeMillis());
|
||||
node.setUpdateTime(System.currentTimeMillis());
|
||||
node.setId(UUID.randomUUID().toString());
|
||||
node.setLevel(level);
|
||||
node.setName(name);
|
||||
node.setProjectId(projectId);
|
||||
return node;
|
||||
}
|
||||
|
||||
private void validateNode(ApiModule node) {
|
||||
if (node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH) {
|
||||
throw new RuntimeException(Translator.get("test_case_node_level_tip")
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8a972a198775b3783ed6e4cef27197e53d1ebdc8
|
||||
Subproject commit a22a3005d9bd254793fcf634d72539cbdf31be3a
|
Loading…
Reference in New Issue