update not allInOne html template
This commit is contained in:
parent
dba147fdc5
commit
1a38c934aa
|
@ -96,20 +96,36 @@ public class DocBuilderTemplate extends BaseDocBuilderTemplate {
|
|||
* @param template template
|
||||
* @param outPutFileName output file
|
||||
*/
|
||||
public void buildAllInOne(List<ApiDoc> apiDocList, ApiConfig config, JavaProjectBuilder javaProjectBuilder, String template, String outPutFileName) {
|
||||
public void buildAllInOne(List<ApiDoc> apiDocList, ApiConfig config, JavaProjectBuilder javaProjectBuilder,
|
||||
String template, String outPutFileName) {
|
||||
buildDoc(apiDocList, config, javaProjectBuilder, template, outPutFileName, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge all api doc into one document
|
||||
*
|
||||
* @param apiDocList list data of Api doc
|
||||
* @param config api config
|
||||
* @param javaProjectBuilder JavaProjectBuilder
|
||||
* @param template template
|
||||
* @param outPutFileName output file
|
||||
* @param apiDoc apiDoc
|
||||
*/
|
||||
public void buildDoc(List<ApiDoc> apiDocList, ApiConfig config, JavaProjectBuilder javaProjectBuilder,
|
||||
String template, String outPutFileName, ApiDoc apiDoc) {
|
||||
String outPath = config.getOutPath();
|
||||
String strTime = DateTimeUtil.long2Str(now, DateTimeUtil.DATE_FORMAT_SECOND);
|
||||
FileUtil.mkdirs(outPath);
|
||||
List<ApiErrorCode> errorCodeList = errorCodeDictToList(config);
|
||||
|
||||
Template tpl = BeetlTemplateUtil.getByName(template);
|
||||
String style = config.getStyle();
|
||||
tpl.binding(TemplateVariable.STYLE.getVariable(),style);
|
||||
tpl.binding(TemplateVariable.STYLE.getVariable(), style);
|
||||
tpl.binding(TemplateVariable.BACKGROUND.getVariable(), HighlightStyle.getBackgroundColor(style));
|
||||
tpl.binding(TemplateVariable.API_DOC_LIST.getVariable(), apiDocList);
|
||||
tpl.binding(TemplateVariable.ERROR_CODE_LIST.getVariable(), errorCodeList);
|
||||
tpl.binding(TemplateVariable.VERSION_LIST.getVariable(), config.getRevisionLogs());
|
||||
tpl.binding(TemplateVariable.VERSION.getVariable(), now);
|
||||
|
||||
tpl.binding(TemplateVariable.CREATE_TIME.getVariable(), strTime);
|
||||
tpl.binding(TemplateVariable.PROJECT_NAME.getVariable(), config.getProjectName());
|
||||
tpl.binding(TemplateVariable.REQUEST_EXAMPLE.getVariable(), config.isRequestExample());
|
||||
|
@ -119,6 +135,11 @@ public class DocBuilderTemplate extends BaseDocBuilderTemplate {
|
|||
} else {
|
||||
tpl.binding(TemplateVariable.DICT_ORDER.getVariable(), apiDocList.size() + 2);
|
||||
}
|
||||
if (Objects.nonNull(apiDoc)) {
|
||||
tpl.binding(TemplateVariable.DESC.getVariable(), apiDoc.getDesc());
|
||||
tpl.binding(TemplateVariable.ORDER.getVariable(), apiDoc.order);
|
||||
tpl.binding(TemplateVariable.LIST.getVariable(), apiDoc.getList());//类名
|
||||
}
|
||||
setDirectoryLanguageVariable(config, tpl);
|
||||
List<ApiDocDict> apiDocDictList = buildDictionary(config, javaProjectBuilder);
|
||||
tpl.binding(TemplateVariable.DICT_LIST.getVariable(), apiDocDictList);
|
||||
|
@ -140,6 +161,65 @@ public class DocBuilderTemplate extends BaseDocBuilderTemplate {
|
|||
FileUtil.nioWriteFile(mapper.render(), config.getOutPath() + FILE_SEPARATOR + outPutFileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* build error_code html
|
||||
*
|
||||
* @param config api config
|
||||
* @param apiDocList list data of Api doc
|
||||
* @param template template
|
||||
* @param outPutFileName output file
|
||||
*/
|
||||
public void buildErrorCodeDoc(ApiConfig config, JavaProjectBuilder javaProjectBuilder,
|
||||
List<ApiDoc> apiDocList, String template, String outPutFileName) {
|
||||
List<ApiErrorCode> errorCodeList = errorCodeDictToList(config);
|
||||
Template errorTemplate = BeetlTemplateUtil.getByName(template);
|
||||
errorTemplate.binding(TemplateVariable.PROJECT_NAME.getVariable(), config.getProjectName());
|
||||
String style = config.getStyle();
|
||||
errorTemplate.binding(TemplateVariable.STYLE.getVariable(), style);
|
||||
if (CollectionUtil.isEmpty(errorCodeList)) {
|
||||
errorTemplate.binding(TemplateVariable.DICT_ORDER.getVariable(), apiDocList.size() + 1);
|
||||
} else {
|
||||
errorTemplate.binding(TemplateVariable.DICT_ORDER.getVariable(), apiDocList.size() + 2);
|
||||
}
|
||||
List<ApiDocDict> apiDocDictList = buildDictionary(config, javaProjectBuilder);
|
||||
errorTemplate.binding(TemplateVariable.DICT_LIST.getVariable(), apiDocDictList);
|
||||
errorTemplate.binding(TemplateVariable.API_DOC_LIST.getVariable(), apiDocList);
|
||||
errorTemplate.binding(TemplateVariable.BACKGROUND.getVariable(), HighlightStyle.getBackgroundColor(style));
|
||||
errorTemplate.binding(TemplateVariable.ERROR_CODE_LIST.getVariable(), errorCodeList);
|
||||
setDirectoryLanguageVariable(config, errorTemplate);
|
||||
FileUtil.nioWriteFile(errorTemplate.render(), config.getOutPath() + FILE_SEPARATOR + outPutFileName);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* build common_data doc
|
||||
*
|
||||
* @param config api config
|
||||
* @param javaProjectBuilder JavaProjectBuilder
|
||||
* @param apiDocList list data of Api doc
|
||||
* @param template template
|
||||
* @param outPutFileName output file
|
||||
*/
|
||||
public void buildDirectoryDataDoc(ApiConfig config, JavaProjectBuilder javaProjectBuilder, List<ApiDoc> apiDocList, String template, String outPutFileName) {
|
||||
List<ApiDocDict> directoryList = buildDictionary(config, javaProjectBuilder);
|
||||
Template mapper = BeetlTemplateUtil.getByName(template);
|
||||
mapper.binding(TemplateVariable.PROJECT_NAME.getVariable(), config.getProjectName());
|
||||
String style = config.getStyle();
|
||||
mapper.binding(TemplateVariable.STYLE.getVariable(), style);
|
||||
List<ApiErrorCode> errorCodeList = errorCodeDictToList(config);
|
||||
if (CollectionUtil.isEmpty(errorCodeList)) {
|
||||
mapper.binding(TemplateVariable.DICT_ORDER.getVariable(), apiDocList.size() + 1);
|
||||
} else {
|
||||
mapper.binding(TemplateVariable.DICT_ORDER.getVariable(), apiDocList.size() + 2);
|
||||
}
|
||||
mapper.binding(TemplateVariable.API_DOC_LIST.getVariable(), apiDocList);
|
||||
mapper.binding(TemplateVariable.BACKGROUND.getVariable(), HighlightStyle.getBackgroundColor(style));
|
||||
mapper.binding(TemplateVariable.ERROR_CODE_LIST.getVariable(), errorCodeList);
|
||||
setDirectoryLanguageVariable(config, mapper);
|
||||
mapper.binding(TemplateVariable.DICT_LIST.getVariable(), directoryList);
|
||||
FileUtil.nioWriteFile(mapper.render(), config.getOutPath() + FILE_SEPARATOR + outPutFileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* build common_data doc
|
||||
*
|
||||
|
|
|
@ -22,27 +22,18 @@
|
|||
*/
|
||||
package com.power.doc.builder;
|
||||
|
||||
import com.power.common.util.CollectionUtil;
|
||||
import com.power.common.util.DateTimeUtil;
|
||||
import com.power.common.util.FileUtil;
|
||||
import com.power.doc.constants.DocGlobalConstants;
|
||||
import com.power.doc.constants.DocLanguage;
|
||||
import com.power.doc.constants.TemplateVariable;
|
||||
import com.power.doc.model.ApiConfig;
|
||||
import com.power.doc.model.ApiDoc;
|
||||
import com.power.doc.model.ApiDocDict;
|
||||
import com.power.doc.model.ApiErrorCode;
|
||||
import com.power.doc.template.IDocBuildTemplate;
|
||||
import com.power.doc.template.SpringBootDocBuildTemplate;
|
||||
import com.power.doc.utils.BeetlTemplateUtil;
|
||||
import com.power.doc.utils.MarkDownUtil;
|
||||
import com.thoughtworks.qdox.JavaProjectBuilder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.beetl.core.Template;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.power.doc.constants.DocGlobalConstants.*;
|
||||
|
||||
|
@ -94,125 +85,33 @@ public class HtmlApiDocBuilder {
|
|||
builderTemplate.buildAllInOne(apiDocList, config, javaProjectBuilder, ALL_IN_ONE_HTML_TPL, INDEX_HTML);
|
||||
}
|
||||
} else {
|
||||
List<ApiDocDict> apiDocDictList = builderTemplate.buildDictionary(config, javaProjectBuilder);
|
||||
buildIndex(apiDocList, config);
|
||||
copyCss(config.getOutPath());
|
||||
buildDoc(apiDocList, config);
|
||||
buildErrorCodeDoc(config.getErrorCodes(), config.getOutPath());
|
||||
buildDictionary(apiDocDictList, config.getOutPath());
|
||||
Template indexCssTemplate = BeetlTemplateUtil.getByName(ALL_IN_ONE_CSS);
|
||||
FileUtil.nioWriteFile(indexCssTemplate.render(), config.getOutPath() + FILE_SEPARATOR + ALL_IN_ONE_CSS);
|
||||
buildDoc(builderTemplate,apiDocList,config,javaProjectBuilder);
|
||||
builderTemplate.buildErrorCodeDoc(config,javaProjectBuilder,apiDocList,
|
||||
"html/error.html","error.html");
|
||||
builderTemplate.buildDirectoryDataDoc(config,javaProjectBuilder,apiDocList,
|
||||
"html/dict.html","dict.html");
|
||||
}
|
||||
}
|
||||
|
||||
private static void copyCss(String outPath) {
|
||||
Template indexCssTemplate = BeetlTemplateUtil.getByName(INDEX_CSS_TPL);
|
||||
Template mdCssTemplate = BeetlTemplateUtil.getByName(MARKDOWN_CSS_TPL);
|
||||
FileUtil.nioWriteFile(indexCssTemplate.render(), outPath + FILE_SEPARATOR + INDEX_CSS_TPL);
|
||||
FileUtil.nioWriteFile(mdCssTemplate.render(), outPath + FILE_SEPARATOR + MARKDOWN_CSS_TPL);
|
||||
}
|
||||
|
||||
/**
|
||||
* build api.html
|
||||
*
|
||||
* @param apiDocList list of api doc
|
||||
* @param config ApiConfig
|
||||
*/
|
||||
private static void buildIndex(List<ApiDoc> apiDocList, ApiConfig config) {
|
||||
FileUtil.mkdirs(config.getOutPath());
|
||||
Template indexTemplate = BeetlTemplateUtil.getByName(INDEX_TPL);
|
||||
if (CollectionUtil.isEmpty(apiDocList)) {
|
||||
return;
|
||||
}
|
||||
ApiDoc doc = apiDocList.get(0);
|
||||
String homePage = doc.getAlias();
|
||||
indexTemplate.binding(TemplateVariable.HOME_PAGE.getVariable(), homePage);
|
||||
indexTemplate.binding(TemplateVariable.VERSION.getVariable(), now);
|
||||
indexTemplate.binding(TemplateVariable.API_DOC_LIST.getVariable(), apiDocList);
|
||||
indexTemplate.binding(TemplateVariable.ERROR_CODE_LIST.getVariable(), config.getErrorCodes());
|
||||
indexTemplate.binding(TemplateVariable.DICT_LIST.getVariable(), config.getDataDictionaries());
|
||||
if (CollectionUtil.isEmpty(config.getErrorCodes())) {
|
||||
indexTemplate.binding(TemplateVariable.DICT_ORDER.getVariable(), apiDocList.size() + 1);
|
||||
} else {
|
||||
indexTemplate.binding(TemplateVariable.DICT_ORDER.getVariable(), apiDocList.size() + 2);
|
||||
}
|
||||
if (null != config.getLanguage()) {
|
||||
if (DocLanguage.CHINESE.code.equals(config.getLanguage().getCode())) {
|
||||
indexTemplate.binding(TemplateVariable.ERROR_LIST_TITLE.getVariable(), ERROR_CODE_LIST_CN_TITLE);
|
||||
indexTemplate.binding(TemplateVariable.DICT_LIST_TITLE.getVariable(), DocGlobalConstants.DICT_CN_TITLE);
|
||||
} else {
|
||||
indexTemplate.binding(TemplateVariable.ERROR_LIST_TITLE.getVariable(), ERROR_CODE_LIST_EN_TITLE);
|
||||
indexTemplate.binding(TemplateVariable.DICT_LIST_TITLE.getVariable(), DocGlobalConstants.DICT_EN_TITLE);
|
||||
}
|
||||
} else {
|
||||
indexTemplate.binding(TemplateVariable.ERROR_LIST_TITLE.getVariable(), ERROR_CODE_LIST_CN_TITLE);
|
||||
indexTemplate.binding(TemplateVariable.DICT_LIST_TITLE.getVariable(), DocGlobalConstants.DICT_CN_TITLE);
|
||||
}
|
||||
FileUtil.nioWriteFile(indexTemplate.render(), config.getOutPath() + FILE_SEPARATOR + "api.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* build ever controller api
|
||||
*
|
||||
* @param apiDocList list of api doc
|
||||
* @param config ApiConfig
|
||||
*/
|
||||
private static void buildDoc(List<ApiDoc> apiDocList, ApiConfig config) {
|
||||
private static void buildDoc(DocBuilderTemplate builderTemplate,List<ApiDoc> apiDocList,
|
||||
ApiConfig config,JavaProjectBuilder javaProjectBuilder) {
|
||||
FileUtil.mkdirs(config.getOutPath());
|
||||
Template htmlApiDoc;
|
||||
int index = 0;
|
||||
for (ApiDoc doc : apiDocList) {
|
||||
Template apiTemplate = BeetlTemplateUtil.getByName(API_DOC_MD_TPL);
|
||||
apiTemplate.binding(TemplateVariable.REQUEST_EXAMPLE.getVariable(), config.isRequestExample());
|
||||
apiTemplate.binding(TemplateVariable.RESPONSE_EXAMPLE.getVariable(), config.isResponseExample());
|
||||
apiTemplate.binding(TemplateVariable.DESC.getVariable(), doc.getDesc());
|
||||
apiTemplate.binding(TemplateVariable.NAME.getVariable(), doc.getName());
|
||||
apiTemplate.binding(TemplateVariable.LIST.getVariable(), doc.getList());//类名
|
||||
Map<String, Object> templateVariables = new HashMap<>();
|
||||
templateVariables.put(TemplateVariable.TITLE.getVariable(), doc.getDesc());
|
||||
htmlApiDoc = initTemplate(apiTemplate, HTML_API_DOC_TPL, templateVariables);
|
||||
FileUtil.nioWriteFile(htmlApiDoc.render(), config.getOutPath() + FILE_SEPARATOR + doc.getAlias() + ".html");
|
||||
if(index == 0){
|
||||
doc.setAlias("api");
|
||||
}
|
||||
builderTemplate.buildDoc(apiDocList,config,javaProjectBuilder,"html/index.html",
|
||||
doc.getAlias() + ".html",doc);
|
||||
index ++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* build error_code html
|
||||
*
|
||||
* @param errorCodeList list of error code
|
||||
* @param outPath
|
||||
*/
|
||||
private static void buildErrorCodeDoc(List<ApiErrorCode> errorCodeList, String outPath) {
|
||||
if (CollectionUtil.isNotEmpty(errorCodeList)) {
|
||||
Template errorTemplate = BeetlTemplateUtil.getByName(ERROR_CODE_LIST_MD_TPL);
|
||||
errorTemplate.binding(TemplateVariable.LIST.getVariable(), errorCodeList);
|
||||
Map<String, Object> templateVariables = new HashMap<>();
|
||||
templateVariables.put(TemplateVariable.TITLE.getVariable(), ERROR_CODE_LIST_EN_TITLE);
|
||||
Template errorCodeDoc = initTemplate(errorTemplate, HTML_API_DOC_TPL, templateVariables);
|
||||
FileUtil.nioWriteFile(errorCodeDoc.render(), outPath + FILE_SEPARATOR + "error_code.html");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* build dictionary
|
||||
*
|
||||
* @param apiDocDictList dictionary list
|
||||
* @param outPath
|
||||
*/
|
||||
private static void buildDictionary(List<ApiDocDict> apiDocDictList, String outPath) {
|
||||
if (CollectionUtil.isNotEmpty(apiDocDictList)) {
|
||||
Template template = BeetlTemplateUtil.getByName(DICT_LIST_MD_TPL);
|
||||
template.binding(TemplateVariable.DICT_LIST.getVariable(), apiDocDictList);
|
||||
Map<String, Object> templateVariables = new HashMap<>();
|
||||
templateVariables.put(TemplateVariable.TITLE.getVariable(), DICT_EN_TITLE);
|
||||
Template dictTpl = initTemplate(template, HTML_API_DOC_TPL, templateVariables);
|
||||
FileUtil.nioWriteFile(dictTpl.render(), outPath + FILE_SEPARATOR + "dict.html");
|
||||
}
|
||||
}
|
||||
|
||||
private static Template initTemplate(Template template, String templateName, Map<String, Object> templateVariables) {
|
||||
String errorHtml = MarkDownUtil.toHtml(template.render());
|
||||
Template template1 = BeetlTemplateUtil.getByName(templateName);
|
||||
template1.binding(TemplateVariable.VERSION.getVariable(), now);
|
||||
template1.binding(TemplateVariable.HTML.getVariable(), errorHtml);
|
||||
template1.binding(TemplateVariable.CREATE_TIME.getVariable(), STR_TIME);
|
||||
template1.binding(templateVariables);
|
||||
return template1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ package com.power.doc.constants;
|
|||
*/
|
||||
public interface DocGlobalConstants {
|
||||
|
||||
int API_ORDER = 0;
|
||||
String FILE_SEPARATOR = System.getProperty("file.separator");
|
||||
|
||||
String HTML_DOC_OUT_PATH = "src/main/resources/static/doc";
|
||||
|
|
|
@ -51,7 +51,8 @@ public enum TemplateVariable {
|
|||
RPC_CONSUMER_CONFIG("consumerConfigExample"),
|
||||
REQUEST_EXAMPLE("isRequestExample"),
|
||||
RESPONSE_EXAMPLE("isResponseExample"),
|
||||
RESPONSE_LIST("respList");
|
||||
RESPONSE_LIST("respList"),
|
||||
ORDER("order");
|
||||
|
||||
private String variable;
|
||||
|
||||
|
|
|
@ -507,7 +507,7 @@ public class DocUtil {
|
|||
return url.toString();
|
||||
} else {
|
||||
url = annotation.getNamedParameter(DocAnnotationConstants.PATH_PROP);
|
||||
return null == url ? StringUtil.ENMPTY : url.toString();
|
||||
return null == url ? StringUtil.EMPTY : url.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="smart-doc">
|
||||
<title>SpringBoot2-Open-Api</title>
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
||||
<link rel="stylesheet" href="AllInOne.css?v=1607962934038"/>
|
||||
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.3.2/styles/xt256.min.css">
|
||||
<style> .literalblock pre, .listingblock pre:not(.highlight), .listingblock pre[class="highlight"], .listingblock pre[class^="highlight "], .listingblock pre.CodeRay, .listingblock pre.prettyprint {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
padding: 0em;
|
||||
}</style>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery/1.12.2/jquery.js"></script>
|
||||
</head>
|
||||
<body class="book toc2 toc-left">
|
||||
<div id="header">
|
||||
<%if(isNotEmpty(projectName)){%><h1>${projectName}</h1><%}%>
|
||||
<div id="toc" class="toc2">
|
||||
<div id="book-search-input"><input id="search" type="text" placeholder="Type to search"></div>
|
||||
<div id="toctitle"><span>API Reference</span></div>
|
||||
<ul id="accordion" class="sectlevel1">
|
||||
<%for(api in apiDocList){%>
|
||||
<%if(apiLP.first){%>
|
||||
<li><a class="dd" href="api.html#header">${api.order}. ${api.desc}</a>
|
||||
<ul class="sectlevel2" style="display: none">
|
||||
<%for(doc in api.list){%>
|
||||
<li><%if(doc.deprecated){%><a href="api.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. <span
|
||||
class="line-through">${doc.desc}</span></a><%}else{%><a
|
||||
href="api.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. ${doc.desc}</a><%}%>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}else{%>
|
||||
<li>
|
||||
<a class="dd" href="${api.alias}.html#header">${api.order}. ${api.desc}</a>
|
||||
<ul class="sectlevel2" style="display: none">
|
||||
<%for(doc in api.list){%>
|
||||
<li><%if(doc.deprecated){%>
|
||||
<a href="${api.alias}.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. <span
|
||||
class="line-through">${doc.desc}</span></a><%}else{%><a
|
||||
href="${api.alias}.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. ${doc.desc}</a><%}%>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}%><%}%><%if(isNotEmpty(errorCodeList)){%>
|
||||
<li><a href="error.html#_error_code_list">${apiDocList.~size+1}.${errorListTitle}</a></li>
|
||||
<%}%><%if(isNotEmpty(dictList)){%>
|
||||
<li class="open"><a class="dd" href="dict.html#_dict_list">${dictListOrder}. ${dictListTitle}</a>
|
||||
<ul class="sectlevel2" style="display: block"><%for(dict in dictList){%>
|
||||
<li><a href="dict.html#_${dictListOrder}_${dict.order}_${dict.title}">${dictListOrder}.${dict.order}. ${dict.title}</a>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<%if(isNotEmpty(dictList)){%>
|
||||
<div class="sect1"><h2 id="_dict_list"><a class="anchor" href="#_dict_list"></a><a class="link" href="#_dict_list">${dictListOrder}. ${dictListTitle}</a>
|
||||
</h2>
|
||||
<div class="sectionbody"><% for(dict in dictList){ %>
|
||||
<div class="sect2"><h3 id="_${dictListOrder}_${dict.order}_${dict.title}"><a class="anchor"
|
||||
href="#_${dictListOrder}_${dict.order}_${dict.title}"></a><a
|
||||
class="link" href="#_${dictListOrder}_${dict.order}_${dict.title}">${dictListOrder}.${dict.order}. ${dict.title}</a>
|
||||
</h3>
|
||||
<table class="tableblock frame-all grid-all spread">
|
||||
<colgroup>
|
||||
<col style="width: 33%;">
|
||||
<col style="width: 33%;">
|
||||
<col style="width: 33%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Code</th>
|
||||
<th class="tableblock halign-left valign-top">Type</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><%for(dataDict in dict.dataDictList){%>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${dataDict.value}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${dataDict.type}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${dataDict.desc}</p></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%}%>
|
||||
</div>
|
||||
</div>
|
||||
<%}%>
|
||||
<footer class="page-footer"><span class="copyright">Generated by smart-doc at 2020-12-15 00:22:14</span><span
|
||||
class="footer-modification">Suggestions,contact,support and error reporting on<a
|
||||
href="https://gitee.com/smart-doc-team/smart-doc" target="_blank"> Gitee</a> or<a
|
||||
href="https://github.com/smart-doc-group/smart-doc.git" target="_blank"> Github</a></span></footer>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
const Accordion = function (el, multiple) {
|
||||
this.el = el || {};
|
||||
this.multiple = multiple || false;
|
||||
const links = this.el.find('.dd');
|
||||
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown);
|
||||
};
|
||||
Accordion.prototype.dropdown = function (e) {
|
||||
const $el = e.data.el;
|
||||
const $this = $(this), $next = $this.next();
|
||||
$next.slideToggle();
|
||||
$this.parent().toggleClass('open');
|
||||
if (!e.data.multiple) {
|
||||
$el.find('.submenu').not($next).slideUp("20").parent().removeClass('open');
|
||||
}
|
||||
};
|
||||
new Accordion($('#accordion'), false);
|
||||
hljs.initHighlightingOnLoad()
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,125 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="smart-doc">
|
||||
<title>SpringBoot2-Open-Api</title>
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
||||
<link rel="stylesheet" href="AllInOne.css?v=1607962934038"/>
|
||||
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.3.2/styles/xt256.min.css">
|
||||
<style> .literalblock pre, .listingblock pre:not(.highlight), .listingblock pre[class="highlight"], .listingblock pre[class^="highlight "], .listingblock pre.CodeRay, .listingblock pre.prettyprint {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
padding: 0em;
|
||||
}</style>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery/1.12.2/jquery.js"></script>
|
||||
</head>
|
||||
<body class="book toc2 toc-left">
|
||||
<div id="header">
|
||||
<%if(isNotEmpty(projectName)){%><h1>${projectName}</h1><%}%>
|
||||
<div id="toc" class="toc2">
|
||||
<div id="book-search-input"><input id="search" type="text" placeholder="Type to search"></div>
|
||||
<div id="toctitle"><span>API Reference</span></div>
|
||||
<ul id="accordion" class="sectlevel1">
|
||||
<%for(api in apiDocList){%>
|
||||
<%if(apiLP.first){%>
|
||||
<li>
|
||||
<a class="dd" href="api.html#header">${api.order}. ${api.desc}</a>
|
||||
<ul class="sectlevel2" style="display: none">
|
||||
<%for(doc in api.list){%>
|
||||
<li><%if(doc.deprecated){%><a href="api.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. <span
|
||||
class="line-through">${doc.desc}</span></a><%}else{%><a
|
||||
href="api.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. ${doc.desc}</a><%}%>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}else{%>
|
||||
<li><a class="dd" href="${api.alias}.html#header">${api.order}. ${api.desc}</a>
|
||||
<ul class="sectlevel2" style="display: none">
|
||||
<%for(doc in api.list){%>
|
||||
<li><%if(doc.deprecated){%>
|
||||
<a href="${api.alias}.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. <span
|
||||
class="line-through">${doc.desc}</span></a><%}else{%><a
|
||||
href="${api.alias}.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. ${doc.desc}</a><%}%>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}%><%}%><%if(isNotEmpty(errorCodeList)){%>
|
||||
<li class="open"><a href="error.html#_error_code_list">${apiDocList.~size+1}.${errorListTitle}</a>
|
||||
</li>
|
||||
<%}%><%if(isNotEmpty(dictList)){%>
|
||||
<li><a class="dd" href="dict.html#_dict_list">${dictListOrder}. ${dictListTitle}</a>
|
||||
<ul class="sectlevel2"><%for(dict in dictList){%>
|
||||
<li><a href="dict.html#_${dictListOrder}_${dict.order}_${dict.title}">${dictListOrder}.${dict.order}. ${dict.title}</a>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<%if(isNotEmpty(errorCodeList)){%>
|
||||
<div class="sect1"><h2 id="_error_code_list"><a class="anchor" href="#_error_code_list"></a><a class="link"
|
||||
href="#_error_code_list">${apiDocList.~size+1}. ${errorListTitle}</a>
|
||||
</h2>
|
||||
<div class="sectionbody">
|
||||
<table class="tableblock frame-all grid-all spread">
|
||||
<colgroup>
|
||||
<col style="width: 50%;">
|
||||
<col style="width: 50%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Error code</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><%for(error in errorCodeList){%>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${error.value}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${error.desc}</p></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<%}%>
|
||||
<footer class="page-footer"><span class="copyright">Generated by smart-doc at 2020-12-15 00:22:14</span><span
|
||||
class="footer-modification">Suggestions,contact,support and error reporting on<a
|
||||
href="https://gitee.com/smart-doc-team/smart-doc" target="_blank"> Gitee</a> or<a
|
||||
href="https://github.com/smart-doc-group/smart-doc.git" target="_blank"> Github</a></span>
|
||||
</footer>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
const Accordion = function (el, multiple) {
|
||||
this.el = el || {};
|
||||
this.multiple = multiple || false;
|
||||
const links = this.el.find('.dd');
|
||||
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown);
|
||||
};
|
||||
Accordion.prototype.dropdown = function (e) {
|
||||
const $el = e.data.el;
|
||||
const $this = $(this), $next = $this.next();
|
||||
$next.slideToggle();
|
||||
$this.parent().toggleClass('open');
|
||||
if (!e.data.multiple) {
|
||||
$el.find('.submenu').not($next).slideUp("20").parent().removeClass('open');
|
||||
}
|
||||
};
|
||||
new Accordion($('#accordion'), false);
|
||||
hljs.initHighlightingOnLoad()
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,299 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="smart-doc">
|
||||
<%if(isNotEmpty(projectName)){%><title>${projectName}</title><%}else{%><title>API Reference</title><%}%>
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
||||
<link rel="stylesheet" href="AllInOne.css?v=${version}"/>
|
||||
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.3.2/styles/xt256.min.css">
|
||||
<style> .literalblock pre, .listingblock pre:not(.highlight), .listingblock pre[class="highlight"], .listingblock pre[class^="highlight "], .listingblock pre.CodeRay, .listingblock pre.prettyprint {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
padding: 0em;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery/1.12.2/jquery.js"></script>
|
||||
</head>
|
||||
<body class="book toc2 toc-left">
|
||||
<div id="header">
|
||||
<%if(isNotEmpty(projectName)){%><h1>${projectName}</h1><%}%>
|
||||
<div id="toc" class="toc2">
|
||||
<div id="book-search-input"><input id="search" type="text" placeholder="Type to search"></div>
|
||||
<div id="toctitle"><span>API Reference</span></div>
|
||||
<ul id="accordion" class="sectlevel1">
|
||||
<%for(api in apiDocList){%>
|
||||
<%if(apiLP.first){%>
|
||||
<%if(api.order==order){%>
|
||||
<li class="open">
|
||||
<%}else{%>
|
||||
<li>
|
||||
<%}%>
|
||||
<a class="dd" href="api.html#header">${api.order}. ${api.desc}</a>
|
||||
<%if(api.order==order){%>
|
||||
<ul class="sectlevel2" style="display: block">
|
||||
<%}else{%>
|
||||
<ul class="sectlevel2" style="display: none">
|
||||
<%}%>
|
||||
<%for(doc in api.list){%>
|
||||
<li><%if(doc.deprecated){%><a href="api.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. <span
|
||||
class="line-through">${doc.desc}</span></a><%}else{%><a
|
||||
href="api.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. ${doc.desc}</a><%}%>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}else{%>
|
||||
<%if(api.order==order){%>
|
||||
<li class="open">
|
||||
<%}else{%>
|
||||
<li>
|
||||
<%}%>
|
||||
<a class="dd" href="${api.alias}.html#header">${api.order}. ${api.desc}</a>
|
||||
<%if(api.order==order){%>
|
||||
<ul class="sectlevel2" style="display: block">
|
||||
<%}else{%>
|
||||
<ul class="sectlevel2" style="display: none">
|
||||
<%}%>
|
||||
<%for(doc in api.list){%>
|
||||
<li><%if(doc.deprecated){%>
|
||||
<a href="${api.alias}.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. <span
|
||||
class="line-through">${doc.desc}</span></a><%}else{%><a
|
||||
href="${api.alias}.html#_${api.order}_${doc.order}_${doc.desc}">${api.order}.${doc.order}. ${doc.desc}</a><%}%>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}%><%}%><%if(isNotEmpty(errorCodeList)){%>
|
||||
<li><a href="error.html#_error_code_list">${apiDocList.~size+1}.${errorListTitle}</a></li>
|
||||
<%}%><%if(isNotEmpty(dictList)){%>
|
||||
<li><a class="dd" href="dict.html#_dict_list">${dictListOrder}. ${dictListTitle}</a>
|
||||
<ul class="sectlevel2"><%for(dict in dictList){%>
|
||||
<li><a href="dict.html#_${dictListOrder}_${dict.order}_${dict.title}">${dictListOrder}.${dict.order}. ${dict.title}</a>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="sect1"><h2 id="_${desc}"><a class="anchor" href="#_${desc}"></a><a class="link" href="#_${desc}">${order}. ${desc}</a>
|
||||
</h2>
|
||||
<div class="sectionbody">
|
||||
<%for(doc in list){%>
|
||||
<div class="sect2"><h3 id="_${order}_${doc.order}_${doc.desc}"><a class="anchor"
|
||||
href="#_${order}_${doc.order}_${doc.desc}"></a><%if(doc.deprecated){%><a
|
||||
class="link" href="#_${order}_${doc.order}_${doc.desc}">${order}.${doc.order}. <span
|
||||
class="line-through">${doc.desc}</span></a><%}else{%><a class="link"
|
||||
href="#_${order}_${doc.order}_${doc.desc}">${order}.${doc.order}. ${doc.desc}</a><%}%>
|
||||
</h3>
|
||||
<div class="paragraph"><p><strong>URL:</strong><a href="${doc.url}" class="bare"> ${doc.url}</a>
|
||||
</p></div>
|
||||
<div class="paragraph"><p><strong>Type:</strong> ${doc.type}</p></div>
|
||||
<%if(isNotEmpty(doc.author)){%>
|
||||
<div class="paragraph"><p><strong>Author:</strong> ${doc.author}</p></div>
|
||||
<%}%>
|
||||
<div class="paragraph"><p><strong>Content-Type:</strong> ${doc.contentType}</p></div>
|
||||
<div class="paragraph"><p><strong>Description:</strong> ${doc.detail}</p></div>
|
||||
<%if(isNotEmpty(doc.requestHeaders)){%>
|
||||
<div class="paragraph"><p><strong>Request-headers:</strong></p></div>
|
||||
<table class="tableblock frame-all grid-all spread">
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Header</th>
|
||||
<th class="tableblock halign-left valign-top">Type</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Since</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><%for(header in doc.requestHeaders){%>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${header.name}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${header.type}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${header.desc}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${header.required}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${header.since}</p></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</tbody>
|
||||
</table>
|
||||
<%}%><%if(isNotEmpty(doc.pathParams)){%>
|
||||
<div class="paragraph"><p><strong>Path-parameters:</strong></p></div>
|
||||
<table class="tableblock frame-all grid-all spread">
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Parameter</th>
|
||||
<th class="tableblock halign-left valign-top">Type</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Since</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><%for(param in doc.pathParams){%>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.field}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.type}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.desc}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.required}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.version}</p></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</tbody>
|
||||
</table>
|
||||
<%}%><%if(isNotEmpty(doc.queryParams)){%>
|
||||
<div class="paragraph"><p><strong>Query-parameters:</strong></p></div>
|
||||
<table class="tableblock frame-all grid-all spread">
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Parameter</th>
|
||||
<th class="tableblock halign-left valign-top">Type</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Since</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><%for(param in doc.queryParams){%>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.field}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.type}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.desc}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.required}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.version}</p></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</tbody>
|
||||
</table>
|
||||
<%}%><%if(isNotEmpty(doc.requestParams)){%>
|
||||
<div class="paragraph"><p><strong>Body-parameters:</strong></p></div>
|
||||
<table class="tableblock frame-all grid-all spread">
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Parameter</th>
|
||||
<th class="tableblock halign-left valign-top">Type</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Since</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><%for(param in doc.requestParams){%>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.field}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.type}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.desc}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.required}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.version}</p></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</tbody>
|
||||
</table>
|
||||
<%}%><%if(isNotEmpty(doc.requestUsage)&&isRequestExample){%>
|
||||
<div class="paragraph"><p><strong>Request-example:</strong></p></div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre><code class="bash">${doc.requestUsage}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<%}%><%if(isNotEmpty(doc.responseParams)){%>
|
||||
<div class="paragraph"><p><strong>Response-fields:</strong></p></div>
|
||||
<table class="tableblock frame-all grid-all spread">
|
||||
<colgroup>
|
||||
<col style="width: 25%;">
|
||||
<col style="width: 25%;">
|
||||
<col style="width: 25%;">
|
||||
<col style="width: 25%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Field</th>
|
||||
<th class="tableblock halign-left valign-top">Type</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Since</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><%for(param in doc.responseParams){%>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.field}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.type}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.desc}</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">${param.version}</p></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</tbody>
|
||||
</table>
|
||||
<%}%><%if(isNotEmpty(doc.responseUsage)&&isResponseExample){%>
|
||||
<div class="paragraph"><p><strong>Response-example:</strong></p></div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre><code class="json">${doc.responseUsage}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<%}%>
|
||||
</div>
|
||||
<%}%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="page-footer"><span class="copyright">Generated by smart-doc at 2020-12-15 00:22:14</span><span
|
||||
class="footer-modification">Suggestions,contact,support and error reporting on<a
|
||||
href="https://gitee.com/smart-doc-team/smart-doc" target="_blank"> Gitee</a> or<a
|
||||
href="https://github.com/smart-doc-group/smart-doc.git" target="_blank"> Github</a></span></footer>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
const Accordion = function (el, multiple) {
|
||||
this.el = el || {};
|
||||
this.multiple = multiple || false;
|
||||
const links = this.el.find('.dd');
|
||||
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown);
|
||||
};
|
||||
Accordion.prototype.dropdown = function (e) {
|
||||
const $el = e.data.el;
|
||||
const $this = $(this), $next = $this.next();
|
||||
$next.slideToggle();
|
||||
$this.parent().toggleClass('open');
|
||||
if (!e.data.multiple) {
|
||||
$el.find('.submenu').not($next).slideUp("20").parent().removeClass('open');
|
||||
}
|
||||
};
|
||||
new Accordion($('#accordion'), false);
|
||||
hljs.initHighlightingOnLoad()
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue