fix gitee #I43JQR #I43555 add isReplace property

This commit is contained in:
xzli15 2021-08-07 14:45:08 +08:00
parent bfb9fe054a
commit 31fbc38394
5 changed files with 17 additions and 1 deletions

View File

@ -8,6 +8,8 @@
2. 新增jsr303 @size和@length支持
3. 修改html的模板样式错误。
4. 修复postman错误#I41G2E 。
5. 新增isReplace配置 。
6. 修复当存在多个jsr注解时部分注解失效问题。
#### 版本号2.2.3
- 更新日期: 2021-07-18

View File

@ -140,6 +140,7 @@ When you need to use smart-doc to generate more API document information, you ca
"appKey": "xxx",// torna appKey, @since 2.0.9
"appToken": "xxx", //torna appToken,@since 2.0.9
"secret": "xx",//torna secret@since 2.0.9
"isReplace":true, torna replace doc @since 2.2.4
"openUrl": "torna server/api/",//torna server url,@since 2.0.9
"tornaDebug":false,"// show log while set true
"ignoreRequestParams":[ //The request parameter object will be discarded when generating the document.@since 1.9.2

View File

@ -107,6 +107,7 @@ public class TornaBuilder {
}
tornaApi.setCommonErrorCodes(buildErrorCode(apiConfig));
tornaApi.setApis(apisList);
tornaApi.setIsReplace(apiConfig.isReplace() ? 1 : 0);
//推送文档信息
Map<String, String> requestJson = TornaConstants.buildParams(PUSH, new Gson().toJson(tornaApi), apiConfig);
//推送字典信息

View File

@ -101,7 +101,7 @@ public class ParamsBuildHelper {
registryClasses, projectBuilder, groupClasses, pid, jsonRequest));
}
} else if (DocGlobalConstants.JAVA_OBJECT_FULLY.equals(className)) {
ApiParam param = ApiParam.of().setField(pre + "any object").setType("object").setPid(pid);
ApiParam param = ApiParam.of().setId(pid + 1).setField(pre + "any object").setType("object").setPid(pid);
if (StringUtil.isEmpty(isRequired)) {
param.setDesc(DocGlobalConstants.ANY_OBJECT_MSG).setVersion(DocGlobalConstants.DEFAULT_VERSION);
} else {

View File

@ -42,6 +42,18 @@ public class TornaApi {
List<Apis> apis;
String author;
List<CommonErrorCode> commonErrorCodes;
/**
* 是否替换文档1替换0不替换追加缺省1
*/
Integer isReplace;
public Integer getIsReplace() {
return isReplace;
}
public void setIsReplace(Integer isReplace) {
this.isReplace = isReplace;
}
public String getAuthor() {
return author;