新增配置torna测试环境参数配置项

This commit is contained in:
Forget 2021-03-12 22:14:22 +08:00
parent a2cec60f1d
commit 60b13124cb
3 changed files with 30 additions and 2 deletions

View File

@ -152,8 +152,8 @@ public class TornaBuilder {
methodApi.setDescription(apiMethodDoc.getDetail());
methodApi.setIsShow(TornaConstants.YES);
debugEnv = new DebugEnv();
debugEnv.setName("测试环境");
debugEnv.setUrl(" ");
debugEnv.setName(config.getDebugEnvName());
debugEnv.setUrl(config.getDebugEnvUrl());
/**
* {
* "name": "goodsName",

View File

@ -25,6 +25,7 @@ package com.power.doc.model;
import com.power.common.util.CollectionUtil;
import com.power.doc.constants.DocLanguage;
import com.power.doc.model.rpc.RpcApiDependency;
import com.power.doc.model.torna.DebugEnv;
import java.util.List;
import java.util.Objects;
@ -294,6 +295,15 @@ public class ApiConfig {
*/
private String openUrl;
/**
* 调试环境名称
*/
private String debugEnvName;
/**
* 调试环境请求路径
*/
private String debugEnvUrl;
public void setSourceCodePaths(List<SourceCodePath> sourceCodePaths) {
this.sourceCodePaths = sourceCodePaths;
}
@ -695,6 +705,22 @@ public class ApiConfig {
this.createDebugPage = createDebugPage;
}
public String getDebugEnvName() {
return debugEnvName;
}
public void setDebugEnvName(String debugEnvName) {
this.debugEnvName = debugEnvName;
}
public String getDebugEnvUrl() {
return debugEnvUrl;
}
public void setDebugEnvUrl(String debugEnvUrl) {
this.debugEnvUrl = debugEnvUrl;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");

View File

@ -35,6 +35,8 @@ public class ApiDocTest {
config.setAppKey("20201216788835306945118208");
config.setAppToken("2f9a7d3858a147b7845ebb48785d4dc7");
config.setSecret("W.ZyGMOB9Q0UqujVxnfi@.I#V&tUUYZR");
config.setDebugEnvName("测试环境");
config.setDebugEnvUrl("http://127.0.0.1");
config.setAllInOne(true);
config.setOutPath("d:\\md3");