add type for Dictionary
This commit is contained in:
parent
a674ad5dcc
commit
250b0189a8
|
@ -201,6 +201,11 @@ public class DocBuilderTemplate {
|
|||
Object val = valueMethod.invoke(object);
|
||||
Object desc = descMethod.invoke(object);
|
||||
DataDict dataDict = new DataDict();
|
||||
if (val instanceof String) {
|
||||
dataDict.setType("string");
|
||||
} else {
|
||||
dataDict.setType("int32");
|
||||
}
|
||||
dataDict.setDesc(desc.toString());
|
||||
dataDict.setValue(val.toString());
|
||||
dataDictList.add(dataDict);
|
||||
|
|
|
@ -13,6 +13,11 @@ public class ApiErrorCode {
|
|||
*/
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* error code type
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* error description
|
||||
*/
|
||||
|
@ -28,6 +33,15 @@ public class ApiErrorCode {
|
|||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public ApiErrorCode setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,10 @@ public class DataDict {
|
|||
*/
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* code type
|
||||
*/
|
||||
private String Type;
|
||||
/**
|
||||
* dict desc
|
||||
*/
|
||||
|
|
|
@ -110,11 +110,11 @@ for(dict in dictList){
|
|||
[width="100%",options="header"]
|
||||
[stripes=even]
|
||||
|====================
|
||||
|Value |Description
|
||||
|Code |Type|Description
|
||||
<%
|
||||
for(dataDict in dict.dataDictList){
|
||||
%>
|
||||
|${dataDict.value}|${dataDict.desc}
|
||||
|${dataDict.value}|${dataDict.type}|${dataDict.desc}
|
||||
<%}%>
|
||||
|====================
|
||||
<%}%>
|
||||
|
|
|
@ -94,12 +94,12 @@ for(dict in dictList){
|
|||
%>
|
||||
### ${dict.title}
|
||||
|
||||
Value |Description
|
||||
Code |Type|Description
|
||||
---|---
|
||||
<%
|
||||
for(dataDict in dict.dataDictList){
|
||||
%>
|
||||
${dataDict.value}|${dataDict.desc}
|
||||
${dataDict.value}|${dataDict.type}|${dataDict.desc}
|
||||
<%}%>
|
||||
<%}%>
|
||||
<%}%>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue