Merge remote-tracking branch 'origin/dev'
# Conflicts: # src/main/java/com/power/doc/builder/OpenApiBuilder.java
This commit is contained in:
commit
d1bdf37d26
|
@ -36,7 +36,7 @@ smart-doc + [Torna](http://torna.cn) form an industry-leading document generatio
|
|||
smart-doc to complete Java source code analysis and extract annotations to generate API documents without intrusion, and
|
||||
automatically push the documents to the Torna enterprise-level interface document management platform.
|
||||
|
||||
![smart-doc+torna](https://raw.githubusercontent.com/shalousun/smart-doc/master/images/smart-doc-torna.png)
|
||||
![smart-doc+torna](https://raw.githubusercontent.com/shalousun/smart-doc/master/images/smart-doc-torna-en.png)
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
@ -312,13 +312,6 @@ If you use gradle to build the project, you can refer to the documentation of th
|
|||
|
||||
![response-fields](https://images.gitee.com/uploads/images/2019/1231/223817_32bea6dc_144669.png "response.png")
|
||||
|
||||
## Integration through unit tests
|
||||
|
||||
You can generate documentation by adding smart-doc dependencies directly to your project and then writing unit tests to
|
||||
start smart-doc. we still recommend that you use the smart-doc-maven-plugin plugin.
|
||||
|
||||
[Use smart-doc by junit test](https://github.com/smart-doc-group/smart-doc/wiki/Use-smart-doc-by-junit-test)
|
||||
|
||||
## Building
|
||||
|
||||
You could build with the following commands. (Java 1.8 is required to build the master branch)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
|
@ -247,8 +247,10 @@ public class OpenApiBuilder {
|
|||
detail = new HashMap<>();
|
||||
detail.put("type", apiParam.getType());
|
||||
detail.put("description", apiParam.getDesc());
|
||||
|
||||
detail.put("example", DocUtil.handleJsonStr(apiParam.getValue()));
|
||||
if ("file".equals(apiParam.getType())) {
|
||||
detail.remove("example");
|
||||
if (apiParam.isHasItems()) {
|
||||
detail.put("type", "array");
|
||||
Map<String, Object> items = new HashMap<>();
|
||||
|
|
Loading…
Reference in New Issue