Skip to content

Commit

Permalink
Merge pull request TongchengOpenSource#692 from shalousun/master
Browse files Browse the repository at this point in the history
update: README_CN.md and README.md
  • Loading branch information
shalousun authored Dec 18, 2023
2 parents 720f64d + 5b23bd1 commit 7ef2a46
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 39 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
![git star](https://img.shields.io/github/stars/smart-doc-group/smart-doc.svg)
## Introduce

smart-doc is a tool that supports both JAVA REST API and Apache Dubbo RPC interface document generation. Smart-doc is
`smart-doc[smɑːt dɒk]`is a tool that supports both `JAVA REST API` and `Apache Dubbo RPC` interface document generation. `Smart-doc` is
based on interface source code analysis to generate interface documents, and zero annotation intrusion. You only need to
write Javadoc comments when developing, smart-doc can help you generate Markdown or HTML5 document. smart-doc does not
need to inject annotations into the code like Swagger.
write Javadoc comments when developing, `smart-doc` can help you generate `Markdown` or `HTML5` document. `smart-doc` does not
need to inject annotations into the code like `Swagger`.

[quick start](https://smart-doc-group.github.io/#/)

Expand All @@ -23,31 +23,32 @@ need to inject annotations into the code like Swagger.

## Features

- Zero annotation, zero learning cost, only need to write standard JAVA document comments.
- Zero annotation, zero learning cost, only need to write standard `JAVA` document comments.
- Automatic derivation based on source code interface definition, powerful return structure derivation support.
- Support Spring MVC, Spring Boot, Spring Boot Web Flux (Not support endpoint), Feign ,JAX-RS.
- Supports the derivation of asynchronous interface returns such as Callable, Future, CompletableFuture.
- Support JSR-303 parameter verification specification.
- Support `Spring MVC`, `Spring Boot`, `Spring Boot Web Flux` (Not support endpoint), `Feign`,`JAX-RS`.
- Supports the derivation of asynchronous interface returns such as `Callable`, `Future`, `CompletableFuture`.
- Support `JSR-303`parameter verification specification.
- Support for automatic generation of request examples based on request parameters.
- Support for generating JSON return value examples.
- Support for generating `JSON` return value examples.
- Support for loading source code from outside the project to generate field comments (including the sources jar
package).
- Support for generating multiple formats of documents: Markdown,HTML5,Asciidoctor,Postman Collection 2.0+,OpenAPI 3.0.
- Support for generating multiple formats of documents: `Markdown`,`HTML5`,`Word`,`Asciidoctor`,`Postman Collection 2.0+`,`OpenAPI 3.0`.
- Support the generation of `Jmeter` performance testing scripts
- Support for exporting error codes and data dictionary codes to API documentation.
- The debug html5 page fully supports file upload and download testing.
- Support Apache Dubbo RPC.
- Support `Apache Dubbo RP`C.

## Best Practice

smart-doc + [Torna](http://torna.cn) form an industry-leading document generation and management solution, using
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](http://torna.cn) form an industry-leading document generation and management solution, using
`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-en.png)

## 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. (`JDK 1.8` is required to build the master branch)

```
mvn clean install -Dmaven.test.skip=true
Expand All @@ -57,13 +58,12 @@ mvn clean install -Dmaven.test.skip=true

- GRPC
- SOCKET
- WORD

## Who is using

These are only part of the companies using smart-doc, for reference only. If you are using smart-doc,
These are only part of the companies using `smart-doc`, for reference only. If you are using smart-doc,
please [add your company here](https://github.com/smart-doc-group/smart-doc/issues/12) to tell us your scenario to make
smart-doc better.
`smart-doc` better.

![IFLYTEK](https://raw.githubusercontent.com/smart-doc-group/smart-doc/master/images/known-users/iflytek.png)
&nbsp;&nbsp;<img src="https://raw.githubusercontent.com/smart-doc-group/smart-doc/master/images/known-users/oneplus.png" title="OnePlus" width="83px" height="83px"/>
Expand All @@ -88,7 +88,7 @@ Thanks to [JetBrains SoftWare](https://www.jetbrains.com) for providing free Ope

## License

Smart-doc is under the Apache 2.0 license. See
`Smart-doc` is under the Apache 2.0 license. See
the [LICENSE](https://github.com/smart-doc-group/smart-doc/blob/master/LICENSE)
file for details.

Expand Down
38 changes: 20 additions & 18 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

## Introduce

smart-doc是一款同时支持JAVA REST API和Apache Dubbo RPC接口文档生成的工具,smart-doc在业内率先提出基于JAVA泛型定义推导的理念
完全基于接口源码来分析生成接口文档,不采用任何注解侵入到业务代码中。你只需要按照java-doc标准编写注释, smart-doc就能帮你生成一个简易明了的Markdown、HTML5Postman
Collection2.0+OpenAPI 3.0+的文档。
`smart-doc[smɑːt dɒk]`是一款同时支持`JAVA REST API``Apache Dubbo RPC`接口文档生成的工具,`smart-doc`在业内率先提出基于`JAVA`泛型定义推导的理念
完全基于接口源码来分析生成接口文档,不采用任何注解侵入到业务代码中。你只需要按照`Javadoc`标准编写注释, `smart-doc`就能帮你生成一个简易明了的`Markdown``HTML5``Postman`
`Collection2.0+``OpenAPI 3.0+`的文档。

$\color{red}{你给我的star,胜过所有读过的诗—smart-doc}$

Expand All @@ -23,24 +23,27 @@ $\color{red}{你给我的star,胜过所有读过的诗—smart-doc}$

## Features

- 零注解、零学习成本、只需要写标准JAVA注释
- 零注解、零学习成本、只需要写标准`JAVA`注释
- 基于源代码接口定义自动推导,强大的返回结构推导。
- 支持Spring MVCSpring BootSpring Boot Web Flux(controller书写方式)、Feign、JAX-RS
- 支持Callable、Future、CompletableFuture等异步接口返回的推导
- 支持JavaBean上的JSR303参数校验规范,包括分组验证。
- 对JSON请求参数的接口能够自动生成模拟JSON参数
- 支持`Spring MVC``Spring Boot``Spring Boot Web Flux`(`Controller`书写方式)、`Feign`
- 支持`Callable``Future``CompletableFuture`等异步接口返回的推导
- 支持`JavaBean`上的`JSR303`参数校验规范,包括分组验证。
- `JSON`请求参数的接口能够自动生成模拟`JSON`参数
- 对一些常用字段定义能够生成有效的模拟值。
- 支持生成JSON返回值示例
- 支持生成`JSON`返回值示例
- 支持从项目外部加载源代码来生成字段注释(包括标准规范发布的jar包)。
- 支持生成多种格式文档:MarkdownHTML5AsciidoctorPostman CollectionOpenAPI 3.0。 Up- 开放文档数据,可自由实现接入文档管理系统。
- 支持生成多种格式文档:`Markdown``HTML5``Word``Asciidoctor``Postman Collection``OpenAPI 3.0` 开放文档数据,可自由实现接入文档管理系统。
- 支持导出错误码和定义在代码中的各种字典码到接口文档。
- 支持Maven、Gradle插件式轻松集成。
- 支持Apache Dubbo RPC接口文档生成。
- debug接口调试html5页面完全支持文件上传,下载(@download tag标记下载方法)测试。
- 支持生成`Jmeter`性能测试脚本。
- 支持`Maven``Gradle`插件式轻松集成。
- 支持`Apache Dubbo RPC`接口文档生成。
- 支持基于`Git`管理项目的变更增量文档生成。
- `debug`接口调试`html5`页面完全支持文件上传,下载(`@download tag`标记下载方法)测试。

## Best Practice

smart-doc + [Torna](http://torna.cn) 组成行业领先的文档生成和管理解决方案,使用smart-doc无侵入完成Java源代码分析和提取注释生成API文档,自动将文档推送到Torna企业级接口文档管理平台。
`smart-doc` + [Torna](http://torna.cn) 组成行业领先的文档生成和管理解决方案,使用`smart-doc`无侵入完成`Java`源代码分析和提取注释生成`API`文档,
自动将文档推送到`Torna[ˈtɔːrnə]`企业级接口文档管理平台。

![smart-doc+torna](https://gitee.com/smart-doc-team/smart-doc/raw/master/images/smart-doc-torna.png)

Expand All @@ -51,7 +54,7 @@ smart-doc + [Torna](http://torna.cn) 组成行业领先的文档生成和管理
## Building

如果你需要自己构建smart-doc,那可以使用下面命令,构建需要依赖Java 1.8。
如果你需要自己构建`smart-doc`,那可以使用下面命令,构建需要依赖`JDK 1.8+`

```
mvn clean install -Dmaven.test.skip=true
Expand All @@ -61,14 +64,13 @@ mvn clean install -Dmaven.test.skip=true

- GRPC
- SOCKET
- WORD

## License

smart-doc is under the Apache 2.0 license. See
`smart-doc` is under the Apache 2.0 license. See
the [LICENSE](https://gitee.com/smart-doc-team/smart-doc/blob/master/LICENSE) file for details.

**注意:** smart-doc源代码文件全部带有版权注释,使用关键代码二次开源请保留原始版权,否则后果自负!
**注意:** `smart-doc`源代码文件全部带有版权注释,使用关键代码二次开源请保留原始版权,否则后果自负!

## Who is using

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/ly/doc/utils/TornaUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,10 @@ private static List<HttpParam> buildTornaDicItems(List<DataDict> dataDicts) {
}

/**
* 设置请求参数是否为数组
*
* @param apiMethodDoc 请求参数
* Set torna tags
* @param method
* @param apiMethodDoc
* @param apiConfig
*/
public static void setTornaArrayTags(JavaMethod method, ApiMethodDoc apiMethodDoc, ApiConfig apiConfig) {
String returnTypeName = method.getReturnType().getCanonicalName();
Expand Down

0 comments on commit 7ef2a46

Please sign in to comment.