template.AllInOne.adoc Maven / Gradle / Ivy
<%if(isNotEmpty(projectName)){%>
= ${projectName}
<%}%>
<%if(isNotEmpty(revisionLogList)){%>
[width="100%",options="header"]
[stripes=even]
|====================
|Version | Update Time | Status | Author | Description
<%
for(revisionLog in revisionLogList){
%>
|${revisionLog.version}|${revisionLog.revisionTime}|${revisionLog.status}|${revisionLog.author}|${revisionLog.remarks}
<%}%>
|====================
<%}%>
<%
for(apiGroup in apiDocList){
%>
<%
if(!apiDocListOnlyHasDefaultGroup) {%>
== ${apiGroup.group}
<%} %>
<%
for(api in apiGroup.childrenApiDocs){
%>
=== ${api.desc}
<%
for(doc in api.list){
%>
<%if(doc.deprecated){%>
==== [line-through]#${doc.desc}#
<%}else{%>
==== ${doc.desc}
<%}%>
*URL:* `${doc.url}`
*Type:* `${doc.type}`
<%if(isNotEmpty(doc.author)){%>
*Author:* ${doc.author}
<%}%>
*Content-Type:* `${doc.contentType}`
<%if(isNotEmpty(doc.headers)){%>
*Request-headers:*
[width="100%",options="header"]
[stripes=even]
|====================
|Header | Type|Required|Description|Since
${doc.headers}
|====================
<%}%>
<%if(isNotEmpty(doc.pathParams)){%>
*Path-parameters:*
[width="100%",options="header"]
[stripes=even]
|====================
|Parameter | Type|Required|Description|Since
<%
for(param in doc.pathParams){
%>
|${param.field}|${param.type}|${param.required}|${param.desc}|${param.version}
<%}%>
|====================
<%}%>
<%if(isNotEmpty(doc.queryParams)){%>
*Query-parameters:*
[width="100%",options="header"]
[stripes=even]
|====================
|Parameter | Type|Required|Description|Since
<%
for(param in doc.queryParams){
%>
|${param.field}|${param.type}|${param.required}|${param.desc}|${param.version}
<%}%>
|====================
<%}%>
<%if(isNotEmpty(doc.requestParams)){%>
*Body-parameters:*
[width="100%",options="header"]
[stripes=even]
|====================
|Parameter | Type|Required|Description|Since
<%
for(param in doc.requestParams){
%>
|${param.field}|${param.type}|${param.required}|${param.desc}|${param.version}
<%}%>
|====================
<%}%>
<%if(isNotEmpty(doc.requestUsage)&&isRequestExample){%>
*Request-example:*
----
${doc.requestUsage}
----
<%}%>
<%if(isNotEmpty(doc.responseParams)){%>
*Response-fields:*
[width="100%",options="header"]
[stripes=even]
|====================
|Field | Type|Description|Since
<%
for(param in doc.responseParams){
%>
|${param.field}|${param.type}|${param.desc}|${param.version}
<%}%>
|====================
<%}%>
<%if(isNotEmpty(doc.responseUsage)&&isResponseExample){%>
*Response-example:*
----
${doc.responseUsage}
----
<%}%>
<% } %>
<% } %>
<% } %>
<%if(isNotEmpty(errorCodeList)){%>
<%if(apiDocListOnlyHasDefaultGroup) { %>
=== ${errorListTitle}
<% } else { %>
== ${errorListTitle}
<% } %>
[width="100%",options="header"]
[stripes=even]
|====================
|Error code |Description
<%
for(error in errorCodeList){
%>
|${error.value}|${error.desc}
<%}%>
|====================
<%}%>
<%if(isNotEmpty(dictList)){%>
<%if(apiDocListOnlyHasDefaultGroup) { %>
=== ${dictListTitle}
<% } else { %>
== ${dictListTitle}
<% } %>
<%
for(dict in dictList){
%>
=== ${dict.title}
[width="100%",options="header"]
[stripes=even]
|====================
|Code |Type|Description
<%
for(dataDict in dict.dataDictList){
%>
|${dataDict.value}|${dataDict.type}|${dataDict.desc}
<%}%>
|====================
<%}%>
<%}%>