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
|
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.
|
automatically push the documents to the Torna enterprise-level interface document management platform.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
|
@ -312,13 +312,6 @@ If you use gradle to build the project, you can refer to the documentation of th
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 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
|
## Building
|
||||||
|
|
||||||
You could build with the following commands. (Java 1.8 is required to build the master branch)
|
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 = new HashMap<>();
|
||||||
detail.put("type", apiParam.getType());
|
detail.put("type", apiParam.getType());
|
||||||
detail.put("description", apiParam.getDesc());
|
detail.put("description", apiParam.getDesc());
|
||||||
|
|
||||||
detail.put("example", DocUtil.handleJsonStr(apiParam.getValue()));
|
detail.put("example", DocUtil.handleJsonStr(apiParam.getValue()));
|
||||||
if ("file".equals(apiParam.getType())) {
|
if ("file".equals(apiParam.getType())) {
|
||||||
|
detail.remove("example");
|
||||||
if (apiParam.isHasItems()) {
|
if (apiParam.isHasItems()) {
|
||||||
detail.put("type", "array");
|
detail.put("type", "array");
|
||||||
Map<String, Object> items = new HashMap<>();
|
Map<String, Object> items = new HashMap<>();
|
||||||
|
|
Loading…
Reference in New Issue