diff --git a/src/main/resources/template/AllInOne.html b/src/main/resources/template/AllInOne.html index bb3f31a..5ab8af1 100644 --- a/src/main/resources/template/AllInOne.html +++ b/src/main/resources/template/AllInOne.html @@ -1 +1 @@ -<%if(isNotEmpty(projectName)){%>${projectName}<%}else{%>API Reference<%}%><%if(isNotEmpty(highlightCssLink)){%><%}%>
<%if(isNotEmpty(revisionLogList)){%>
<%for(revisionLog in revisionLogList){%><%}%>
VersionUpdate TimeStatusAuthorDescription

${revisionLog.version}

${revisionLog.revisionTime}

${revisionLog.status}

${revisionLog.author}

${revisionLog.remarks}

<%}%><%for(apiGroup in apiDocList){%><%if(apiGroupLP.size>1){%>

${apiGroup.order}. ${htmlEscape(apiGroup.name)}

<%}%><%for(api in apiGroup.childrenApiDocs){%>

<%if(apiGroupLP.size>1){%>${apiGroup.order}.${api.order}. ${htmlEscape(api.desc)}<%} else {%> ${api.order}. ${htmlEscape(api.desc)}<%}%>

<%for(doc in api.list){%>

<%if(doc.deprecated){%><% if (apiGroupLP.size > 1){%>${apiGroup.order}.${api.order}.${doc.order}. <%} else{%>${api.order}.${doc.order}. <%}%>${htmlEscape(doc.desc)}<%}else{%><% if (apiGroupLP.size > 1){%>${apiGroup.order}.${api.order}.${doc.order}. ${htmlEscape(doc.desc)}<%} else{%>${api.order}.${doc.order}. ${htmlEscape(doc.desc)}<%}%><%}%>

Type: ${doc.type}

<%if(isNotEmpty(doc.author)){%>

Author:  ${doc.author}

<%}%>

Content-Type: ${doc.contentType}

Description:  ${htmlEscape(doc.detail)}

<%if(isNotEmpty(doc.requestHeaders)&&displayRequestParams){%>

Request-headers:

<%for(header in doc.requestHeaders){%><%}%>
HeaderTypeDescriptionRequiredSince

${header.name}

${header.type}

${htmlEscape(header.desc)}

${header.required}

${header.since}

<%}%><%if(isNotEmpty(doc.pathParams)&&displayRequestParams){%>

Path-parameters:

<%for(param in doc.pathParams){%><%}%>
ParameterTypeDescriptionRequiredSince

${param.field}

${param.type}

${htmlEscape(param.desc)}

${param.required}

${param.version}

<%}%><%if(isNotEmpty(doc.queryParams)&&displayRequestParams){%>

Query-parameters:

<%for(param in doc.queryParams){%><%}%>
ParameterTypeDescriptionRequiredSince

${param.field}

${param.type}

${htmlEscape(param.desc)}

${param.required}

${param.version}

<%}%><%if(isNotEmpty(doc.requestParams)&&displayRequestParams){%>

Body-parameters:

<%for(param in doc.requestParams){%><%}%>
ParameterTypeDescriptionRequiredSince

${param.field}

${param.type}

${htmlEscape(param.desc)}

${param.required}

${param.version}

<%}%><%if(isNotEmpty(doc.requestUsage)&&isRequestExample){%>

Request-example:

${doc.requestUsage}
<%}%><%if(isNotEmpty(doc.responseParams)&&displayResponseParams){%>

Response-fields:

<%for(param in doc.responseParams){%><%}%>
FieldTypeDescriptionSince

${param.field}

${param.type}

${htmlEscape(param.desc)}

${param.version}

<%}%><%if(isNotEmpty(doc.responseUsage)&&isResponseExample){%>

Response-example:

${doc.responseUsage}
<%}%>
<%}%>
<%}%><%}%><%if(isNotEmpty(errorCodeList)){%>

${apiDocList.~size == 1 ? apiDocList[0].childrenApiDocs.~size+1 : apiDocList.~size+1}. ${errorListTitle}

<%for(error in errorCodeList){%><%}%>
Error codeDescription

${error.value}

${htmlEscape(error.desc)}

<%}%><%if(isNotEmpty(dictList)){%>

${apiDocList.~size == 1 ? apiDocList[0].childrenApiDocs.~size+1 : dictListOrder}. ${dictListTitle}

<%for(dict in dictList){%>

${dictListOrder}.${dict.order}. ${htmlEscape(dict.title)}

<%for(dataDict in dict.dataDictList){%><%}%>
CodeTypeDescription

${dataDict.value}

${dataDict.type}

${htmlEscape(dataDict.desc)}

<%}%>
<%}%>
Top
\ No newline at end of file +<%if(isNotEmpty(projectName)){%>${projectName}<%}else{%>API Reference<%}%><%if(isNotEmpty(highlightCssLink)){%><%}%>
<%if(isNotEmpty(revisionLogList)){%>
<%for(revisionLog in revisionLogList){%><%}%>
VersionUpdate TimeStatusAuthorDescription

${revisionLog.version}

${revisionLog.revisionTime}

${revisionLog.status}

${revisionLog.author}

${revisionLog.remarks}

<%}%><%for(apiGroup in apiDocList){%><%if(apiGroupLP.size>1){%>

${apiGroup.order}. ${htmlEscape(apiGroup.name)}

<%}%><%for(api in apiGroup.childrenApiDocs){%>

<%if(apiGroupLP.size>1){%>${apiGroup.order}.${api.order}. ${htmlEscape(api.desc)}<%} else {%> ${api.order}. ${htmlEscape(api.desc)}<%}%>

<%for(doc in api.list){%>

<%if(doc.deprecated){%><% if (apiGroupLP.size > 1){%>${apiGroup.order}.${api.order}.${doc.order}. <%} else{%>${api.order}.${doc.order}. <%}%>${htmlEscape(doc.desc)}<%}else{%><% if (apiGroupLP.size > 1){%>${apiGroup.order}.${api.order}.${doc.order}. ${htmlEscape(doc.desc)}<%} else{%>${api.order}.${doc.order}. ${htmlEscape(doc.desc)}<%}%><%}%>

Type: ${doc.type}

<%if(isNotEmpty(doc.author)){%>

Author:  ${doc.author}

<%}%>

Content-Type: ${doc.contentType}

Description:  ${htmlEscape(doc.detail)}

<%if(isNotEmpty(doc.requestHeaders)&&displayRequestParams){%>

Request-headers:

<%for(header in doc.requestHeaders){%><%}%>
HeaderTypeDescriptionRequiredSince

${header.name}

${header.type}

${htmlEscape(header.desc)}

${header.required}

${header.since}

<%}%><%if(isNotEmpty(doc.pathParams)&&displayRequestParams){%>

Path-parameters:

<%for(param in doc.pathParams){%><%}%>
ParameterTypeDescriptionRequiredSince

${param.field}

${param.type}

${htmlEscape(param.desc)}

${param.required}

${param.version}

<%}%><%if(isNotEmpty(doc.queryParams)&&displayRequestParams){%>

Query-parameters:

<%for(param in doc.queryParams){%><%}%>
ParameterTypeDescriptionRequiredSince

${param.field}

${param.type}

${htmlEscape(param.desc)}

${param.required}

${param.version}

<%}%><%if(isNotEmpty(doc.requestParams)&&displayRequestParams){%>

Body-parameters:

<%for(param in doc.requestParams){%><%}%>
ParameterTypeDescriptionRequiredSince

${param.field}

${param.type}

${htmlEscape(param.desc)}

${param.required}

${param.version}

<%}%><%if(isNotEmpty(doc.requestUsage)&&isRequestExample){%>

Request-example:

${doc.requestUsage}
<%}%><%if(isNotEmpty(doc.responseParams)&&displayResponseParams){%>

Response-fields:

<%for(param in doc.responseParams){%><%}%>
FieldTypeDescriptionSince

${param.field}

${param.type}

${htmlEscape(param.desc)}

${param.version}

<%}%><%if(isNotEmpty(doc.responseUsage)&&isResponseExample){%>

Response-example:

${doc.responseUsage}
<%}%>
<%}%>
<%}%><%}%><%if(isNotEmpty(errorCodeList)){%>

${apiDocList.~size == 1 ? apiDocList[0].childrenApiDocs.~size+1 : apiDocList.~size+1}. ${errorListTitle}

<%for(error in errorCodeList){%><%}%>
Error codeDescription

${error.value}

${htmlEscape(error.desc)}

<%}%><%if(isNotEmpty(dictList)){%>

${apiDocList.~size == 1 ? apiDocList[0].childrenApiDocs.~size+1 : dictListOrder}. ${dictListTitle}

<%for(dict in dictList){%>

${dictListOrder}.${dict.order}. ${htmlEscape(dict.title)}

<%for(dataDict in dict.dataDictList){%><%}%>
CodeTypeDescription

${dataDict.value}

${dataDict.type}

${htmlEscape(dataDict.desc)}

<%}%>
<%}%>
Top
\ No newline at end of file diff --git a/src/main/resources/template/html/dict.html b/src/main/resources/template/html/dict.html index 058e707..fc71565 100644 --- a/src/main/resources/template/html/dict.html +++ b/src/main/resources/template/html/dict.html @@ -115,7 +115,7 @@ } }; new Accordion($('#accordion'), false); - hljs.initHighlightingOnLoad() + hljs.highlightAll() }); diff --git a/src/main/resources/template/html/error.html b/src/main/resources/template/html/error.html index 943fa52..b80d8f6 100644 --- a/src/main/resources/template/html/error.html +++ b/src/main/resources/template/html/error.html @@ -118,7 +118,7 @@ } }; new Accordion($('#accordion'), false); - hljs.initHighlightingOnLoad() + hljs.highlightAll() }); diff --git a/src/main/resources/template/html/index.html b/src/main/resources/template/html/index.html index 7cf09e8..471b0a0 100644 --- a/src/main/resources/template/html/index.html +++ b/src/main/resources/template/html/index.html @@ -266,7 +266,7 @@ } }; new Accordion($('#accordion'), false); - hljs.initHighlightingOnLoad() + hljs.highlightAll() }); diff --git a/src/main/resources/template/js/debug.js b/src/main/resources/template/js/debug.js index 0c8b944..4256938 100644 --- a/src/main/resources/template/js/debug.js +++ b/src/main/resources/template/js/debug.js @@ -15,7 +15,7 @@ $(function () { } }; new Accordion($('#accordion'), false); - hljs.initHighlightingOnLoad(); + hljs.highlightAll(); }); $("[contenteditable=plaintext-only]").on('blur', function (e) {