文档生成

master
王兵 4 years ago
parent a8a9eacb08
commit a1898cfcae

@ -240,6 +240,12 @@ public class OptionDocController {
// doc.setFind("1".equals(docRequestReader.getFindOrSearchflag()));
doc.setTitle(docRequestReader.getClassNote());
doc.setReqParams(docRequestReader.getFieldDocList());
for (String key : docRequestReader.getEnts().keySet()) {
List<DocParam> docParams = docRequestReader.getEnts().get(key);
DocEnt docEnt = new DocEnt();
docEnt.setEntParams(docParams);
doc.addParams(key.split("#")[1], docEnt);
}
}
List<File> rspfiles = Tool.findResponse(moduleFile, apiMethod.getResponse() + ".java");
@ -250,6 +256,12 @@ public class OptionDocController {
} else {
DocResponseReader docResponseReader = new DocResponseReader(rspfiles.get(0));
doc.setRspParams(docResponseReader.getFieldDocList());
for (String key : docResponseReader.getEnts().keySet()) {
List<DocParam> docParams = docResponseReader.getEnts().get(key);
DocEnt docEnt = new DocEnt();
docEnt.setEntParams(docParams);
doc.addParams(key.split("#")[1], docEnt);
}
}
doc.setCheck(true);

@ -107,22 +107,29 @@
<pre>Assert.assertTrue(!response.hasError());</pre>
</div>
<div class="wrapper" v-for="item in select.entList">
<template v-for="item in select.entList">
<h5 :id="item.name">附录参数(<span class="object">{{item.name}}</span>)</h5>
<table>
<tr>
<th width="200">参数</th>
<th width="100">类型</th>
<th>说明</th>`
</tr>
<tr v-for="p in item.entParams">
<td>{{p.name}}</td>
<td><a :href="'#'+p.type">{{p.type}}</a></td>
<td>{{p.note}}</td>
</tr>
</table>
</div>
<div class="wrapper" >
<table>
<tr>
<th width="200">参数</th>
<th width="100">类型</th>
<th>说明</th>
</tr>
<tr v-for="p in item.entParams">
<td>{{p.name}}</td>
<td><a :href="'#'+p.type">{{p.type}}</a></td>
<td>{{p.note}}</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</template>
</div>
</div>
</div>

Loading…
Cancel
Save

Powered by TurnKey Linux.