diff --git a/docs/en/guide/advanced/advancedFeatures.md b/docs/en/guide/advanced/advancedFeatures.md
index e2cde62..22fdd8c 100644
--- a/docs/en/guide/advanced/advancedFeatures.md
+++ b/docs/en/guide/advanced/advancedFeatures.md
@@ -1,6 +1,6 @@
# Advanced features
-## Public request header
+## Public request header
**requestHeaders**
@@ -83,8 +83,8 @@ public CommonResult configQueryParamPost(String configQueryParam) {
return CommonResult.ok();
}
```
-## Static constant replacement
-**Starting from `2.4.2` version, this configuration does not need to be added manually, `smart-doc` can automatically recognize the use of static constants. **
+## ~~Static constant replacement~~
+**Starting from `2.4.2` version, this configuration does not need to be added manually, `smart-doc` can automatically recognize the use of static constants.**
During the development of the `Java Web` interface, some users will use static scenes in the `path` of the `Controller`. Therefore, we also hope that `smart-doc` can parse static constants to obtain the real values.
Let’s look at an example:
@@ -224,15 +224,15 @@ For example, there is an order status enumeration dictionary in the code.
public enum OrderEnum {
- WAIT_PAY("0", "已支付"),
+ WAIT_PAY("0", "wait to pay"),
- PAID("1", "已支付"),
+ PAID("1", "paid"),
- EXPIRED("2","已经失效");
+ EXPIRED("2","expired");
- private String code;
+ private final String code;
- private String desc;
+ private final String desc;
OrderEnum(String code, String desc) {
this.code = code;
diff --git a/docs/en/guide/advanced/config.md b/docs/en/guide/advanced/config.md
index 9210fcd..4547fe7 100644
--- a/docs/en/guide/advanced/config.md
+++ b/docs/en/guide/advanced/config.md
@@ -64,7 +64,7 @@
| `showValidation` | `3.0.3` | ❌ | `Boolean` | `true` | `showValidation` is used to control whether `smart-doc` extracts the JSR validation information of fields for display in the documentation. |
| `jmeter` | `3.0.4` | ❌ | `Object` | | Custom Configurations for JMeter Performance Test Script Generation |
| `addDefaultHttpStatuses` | `3.0.5` | ❌ | `Boolean` | `false` | When generating documentation, consider whether to include the default HTTP status codes from frameworks such as Spring MVC's default `500` and `404` errors. Currently, only the generation of `OpenAPI` documentation supports this feature. |
-| `enumConvertor` | `3.1.0` | ❌ | `Boolean` | `false` | In the header/path/query request mode, whether to enable the enumeration converter, The default value is false.
If true, the enumeration value is parsed as an enumeration example value.
If false, take the enumeration name as the enumeration example value |
+| `enumConvertor` | `3.1.0` | ❌ | `Boolean` | `false` | In the header/path/query request mode, whether to enable the enumeration converter, The default value is false.
If true, the enumeration value is parsed as an enumeration example value.
If false, take the enumeration name as the enumeration example value |
```json
{
diff --git a/docs/en/guide/advanced/debug.md b/docs/en/guide/advanced/debug.md
index d5da05b..7b97355 100644
--- a/docs/en/guide/advanced/debug.md
+++ b/docs/en/guide/advanced/debug.md
@@ -1,6 +1,6 @@
# Interface UI integration
-## `smart-doc` debug page
+## `smart-doc` debug page
Starting from `smart-doc 2.0.0` version, in `allInOne` mode of `html`. You can add the configuration of `"createDebugPage": true`. `smart-doc` will
Create a `debug.html` page. When letting `smart-doc` generate documents, put them directly under `static/doc/`.
@@ -73,7 +73,7 @@ Dependency, so if you want to debug the interface, you can only generate html do
Of course, the smart-doc debugging page can only upload one file for file upload, which is weaker than the Swagger UI. But smart-doc also has advantages over Swagger UI.
For example: the document display is clearer; support for downloading test files
-## `Postman` import debugging
+## `Postman` import debugging
Starting from `smart-doc 1.7.8` version, `smart-doc` supports generating `json` files of `Postman`,
You can use `smart-doc` to generate `Postman` `json` files for the entire project or all interfaces of a microservice.
Then do the test by importing this `json` file into `Collections` of `Postman`. Export `json`.
diff --git a/docs/en/guide/community/contributing.md b/docs/en/guide/community/contributing.md
index 484e045..5c9a253 100644
--- a/docs/en/guide/community/contributing.md
+++ b/docs/en/guide/community/contributing.md
@@ -13,6 +13,11 @@ If you would like to contribute to `smart-doc`, you can follow these steps:
4. After completing your modifications, push the commits and submit a Pull Request to the main `smart-doc` repository. Please refer to the [Pull Request](pull-request-process) process to submit your merge request.
+::: tip
+The code should adhere to the `smart-doc` coding style (using the Spring code style). Please use the command `mvn spring-javaformat:apply` to format the code.
+It is recommended to download the [Spring Java Format](https://github.com/spring-io/spring-javaformat) plugin.
+:::
+
5. Wait for the community Committers to review and merge your Pull Request.
6. If the merge is successful, congratulations, you have made a successful contribution!
diff --git a/docs/en/guide/faq/faq.md b/docs/en/guide/faq/faq.md
index a3cf750..8428dab 100644
--- a/docs/en/guide/faq/faq.md
+++ b/docs/en/guide/faq/faq.md
@@ -213,7 +213,7 @@ You can refer to the following documents to learn alternative configurations:
[Spring boot uses Maven Profile and Spring Profile for multi-environment configuration and packaging](https://cloud.tencent.com/developer/article/1769239)
-## plug-in
+## Plug-in
### The project cannot load the smart-doc plug-in
The error message is as follows:
diff --git a/docs/en/guide/getting-started.md b/docs/en/guide/getting-started.md
index a170a8c..5d7cd27 100644
--- a/docs/en/guide/getting-started.md
+++ b/docs/en/guide/getting-started.md
@@ -49,7 +49,7 @@ Configure the `Maven plug-in` in the `pom.xml` file of the module where the proj
```
-> `includes` needs to be adjusted to configure `artifactId:groupId` for the packages that the project module depends on, and supports regular `artifactId:*`
+> `includes` needs to be adjusted to configure `groupId:artifactId` for the packages that the project module depends on, and supports regular `artifactId:*`
If the project depends on other internal public modules and second-party packages, the dependent packages need to be configured with source code packaging.
diff --git a/docs/en/guide/guide.md b/docs/en/guide/guide.md
index 0f20158..774e9e4 100644
--- a/docs/en/guide/guide.md
+++ b/docs/en/guide/guide.md
@@ -270,7 +270,9 @@ public void download(HttpServletResponse response) throws IOException {
}
```
-Starting from smart-doc 2.0.2, the file name will automatically be read from the download response header `Content-Disposition: attachment; filename=xx`, so there is no need to set `response.setHeader("filename", urlEncode(fileName));` in the response header.
+:::tip TIPS
+Starting from `smart-doc` 2.0.2, the file name will automatically be read from the download response header `Content-Disposition: attachment; filename=xx`, so there is no need to set `response.setHeader("filename", urlEncode(fileName));` in the response header.
+:::
If the response type is one of the following:
- `org.springframework.core.io.Resource`
diff --git a/docs/en/guide/plugins/maven.md b/docs/en/guide/plugins/maven.md
index 015a6c2..d4f09fa 100644
--- a/docs/en/guide/plugins/maven.md
+++ b/docs/en/guide/plugins/maven.md
@@ -1,4 +1,4 @@
-# Maven
+# Maven
Starting from `smart-doc 1.7.9`, the `Maven` plug-in is officially provided, and documents can be generated directly by running the plug-in in the project.
## Environmental requirements
@@ -62,7 +62,7 @@ Specify the project name. It is recommended to use dynamic parameters, such as `
Starting from `2.3.4`, if the projectName is not set in `smart-doc.json` or here, the plug-in is automatically set to the projectName in the pom.
#### excludes & includes
-
+ excludes & includes are used to control the loading of source code.
##### Loading source code mechanism
smart-doc will automatically analyze the dependency tree and load all dependent source codes, but this will cause two problems:
1. Loading unnecessary source code affects document construction efficiency
diff --git a/docs/zh/guide/advanced/advancedFeatures.md b/docs/zh/guide/advanced/advancedFeatures.md
index 5e73a62..6d9f183 100644
--- a/docs/zh/guide/advanced/advancedFeatures.md
+++ b/docs/zh/guide/advanced/advancedFeatures.md
@@ -1,6 +1,6 @@
# 高级特性
-## 公共请求头
+## 公共请求头
**requestHeaders**
@@ -86,8 +86,10 @@ public CommonResult configQueryParamPost(String configQueryParam) {
}
```
-## ~~静态常量替换~~
-**`2.4.2`版本开始,这个配置无需再手动添加,`smart-doc`可以自动识别静态常量的使用。**
+## ~~静态常量替换~~
+:::tip
+**`@sice 2.4.2`版本开始,这个配置无需再手动添加,`smart-doc`可以自动识别静态常量的使用。**
+:::
在`Java Web`接口开发的过程中,有些用户会在`Controller`的路径中使用静态常量。因此,
他们也希望`smart-doc`能够解析这些静态常量并获取到真实的值。下面来看一个例子:
diff --git a/docs/zh/guide/advanced/debug.md b/docs/zh/guide/advanced/debug.md
index c630858..02742b1 100644
--- a/docs/zh/guide/advanced/debug.md
+++ b/docs/zh/guide/advanced/debug.md
@@ -1,6 +1,6 @@
# 接口UI集成
-## `smart-doc`调试页面
+## `smart-doc`调试页面
从`smart-doc 2.0.0`版本开始,在`html`的`allInOne`的模式下。可以添加`"createDebugPage": true`的配置。`smart-doc`会
创建一个`debug.html`的页面。 在让生成`smart-doc`生成文档时直接放入到`static/doc/`下,
@@ -73,7 +73,7 @@ public class WebConfig implements WebMvcConfigurer {
当然smart-doc的调试页面对于文件上传你只能传一个文件,这点相比Swagger UI要弱。但是smart-doc也有比Swagger UI强的地方,
例如:文档展示更清晰明了;支持测试文件下载
-## `Postman` 导入调试
+## `Postman` 导入调试
从`smart-doc 1.7.8`版本开始,`smart-doc`支持生成`Postman`的`json`文件,
你可以使用`smart-doc`生成整个项目的或者某个微服务所有接口的`Postman`的`json`文件,
然后通过将这个`json`文件导入`Postman`的`Collections`做测试。导出`json`.
@@ -106,6 +106,7 @@ public class WebConfig implements WebMvcConfigurer {
```
`smart-doc`支持的`OpenAPI`规范版本比较高,因此需要集成`1.5.0`或者是更高的版本。
+
### 配置Swagger UI
在`application`配置文件中添加如下配置
```
diff --git a/docs/zh/guide/advanced/expand.md b/docs/zh/guide/advanced/expand.md
index 483efc0..6a1ccda 100644
--- a/docs/zh/guide/advanced/expand.md
+++ b/docs/zh/guide/advanced/expand.md
@@ -35,71 +35,70 @@ public void testBuilderControllersApi() {
```
字段信息如下:
-Field | Type|Description|Since
----|---|---|---
-projectName|string|项目名称|-
-projectId|string|项目id,名称做md5生成|-
-language|string|文档生语言(自定义模板可使用)|-
-apiDocList|array|接口文档列表|-
-└─order|int32|controller的顺序,smart-doc自动排序生成|1.7+
-└─name|string|controller类名|-
-└─alias|string|controller名称做md5后的别名|1.7+
-└─list|array|controller中的接口列表|-
- └─methodId|方法id,使用controller+method做md5取32位|1.7.3 +
- └─name|string|method name|1.7.3 +
- └─order|int32|接口序号,自动排序|1.7+
- └─desc|string|method description|-
- └─detail|string|detailed introduction of the method|-
- └─url|string|controller method url|-
- └─author|string|接口作者名称|-
- └─type|string|http request type|-
- └─headers|string|string类型的header拼接,只是为了在模板渲染是减少headers的渲染次数|-
- └─contentType|string|http contentType|-
- └─requestHeaders|array|http request headers|-
- └─name|string|Request header name|-
- └─type|string|Request header type|-
- └─desc|string|Request header description|-
- └─required|boolean|required flag|1.7.0
- └─since|string|Starting version number|1.7.0
- └─requestParams|array|http request params|-
- └─field|string|field|-
- └─type|string|field type|-
- └─desc|string|description|-
- └─required|boolean|require flag|-
- └─version|string|version|-
- └─requestUsage|string|http request usage|-
- └─responseUsage|string|http response usage|-
- └─responseParams|array|http response params|-
- └─field|string|field|-
- └─type|string|field type|-
- └─desc|string|description|-
- └─required|boolean|require flag|-
- └─version|string|version|-
-└─desc|string|method description|-
-apiDocDictList|array|枚举字典列表|-
-└─order|int32|字典顺序|-
-└─title|string|字典名称|-
-└─dataDictList|array|枚举字典表|-
- └─value|string|字典码|-
- └─type|string|字典值类型|-
- └─desc|string|字典描述|-
- └─ordinal|int32|枚举顺序|-
- └─name|string|枚举顺序|-
-errorCodeList|array|枚举错误列表|-
-└─value|string|错误码|-
-└─type|string|错误码类型|-
-└─desc|string|错误码描述|-
-└─ordinal|int32|枚举错误码的顺序|-
-└─name|string|枚举名称|-
-revisionLogs|array|文档变更记录|-
-└─version|string|version|-
-└─status|string|status|-
-└─author|string|author|-
-└─revisionTime|string|update time|-
-└─remarks|string|description|-
-
-
- **注意:** `1.7.9`后获取数据接口有变更,需要自行渲染模板的,以最终数据为重。`ApiDataBuilder`。
+| Field | Type | Description | Since |
+|------------------------------------------------------------------------|----------------------------------|--------------------------------------------|---------|
+| projectName | string | 项目名称 | - |
+| projectId | string | 项目id,名称做md5生成 | - |
+| language | string | 文档生语言(自定义模板可使用) | - |
+| apiDocList | array | 接口文档列表 | - |
+| └─order | int32 | controller的顺序,smart-doc自动排序生成 | 1.7+ |
+| └─name | string | controller类名 | - |
+| └─alias | string | controller名称做md5后的别名 | 1.7+ |
+| └─list | array | controller中的接口列表 | - |
+| └─methodId | 方法id,使用controller+method做md5取32位 | 1.7.3 + | |
+| └─name | string | method name | 1.7.3 + |
+| └─order | int32 | 接口序号,自动排序 | 1.7+ |
+| └─desc | string | method description | - |
+| └─detail | string | detailed introduction of the method | - |
+| └─url | string | controller method url | - |
+| └─author | string | 接口作者名称 | - |
+| └─type | string | http request type | - |
+| └─headers | string | string类型的header拼接,只是为了在模板渲染是减少headers的渲染次数 | - |
+| └─contentType | string | http contentType | - |
+| └─requestHeaders | array | http request headers | - |
+| └─name | string | Request header name | - |
+| └─type | string | Request header type | - |
+| └─desc | string | Request header description | - |
+| └─required | boolean | required flag | 1.7.0 |
+| └─since | string | Starting version number | 1.7.0 |
+| └─requestParams | array | http request params | - |
+| └─field | string | field | - |
+| └─type | string | field type | - |
+| └─desc | string | description | - |
+| └─required | boolean | require flag | - |
+| └─version | string | version | - |
+| └─requestUsage | string | http request usage | - |
+| └─responseUsage | string | http response usage | - |
+| └─responseParams | array | http response params | - |
+| └─field | string | field | - |
+| └─type | string | field type | - |
+| └─desc | string | description | - |
+| └─required | boolean | require flag | - |
+| └─version | string | version | - |
+| └─desc | string | method description | - |
+| apiDocDictList | array | 枚举字典列表 | - |
+| └─order | int32 | 字典顺序 | - |
+| └─title | string | 字典名称 | - |
+| └─dataDictList | array | 枚举字典表 | - |
+| └─value | string | 字典码 | - |
+| └─type | string | 字典值类型 | - |
+| └─desc | string | 字典描述 | - |
+| └─ordinal | int32 | 枚举顺序 | - |
+| └─name | string | 枚举顺序 | - |
+| errorCodeList | array | 枚举错误列表 | - |
+| └─value | string | 错误码 | - |
+| └─type | string | 错误码类型 | - |
+| └─desc | string | 错误码描述 | - |
+| └─ordinal | int32 | 枚举错误码的顺序 | - |
+| └─name | string | 枚举名称 | - |
+| revisionLogs | array | 文档变更记录 | - |
+| └─version | string | version | - |
+| └─status | string | status | - |
+| └─author | string | author | - |
+| └─revisionTime | string | update time | - |
+| └─remarks | string | description | - |
+
+**注意:** `1.7.9`后获取数据接口有变更,需要自行渲染模板的,以最终数据为重。`ApiDataBuilder`。
diff --git a/docs/zh/guide/community/contributing.md b/docs/zh/guide/community/contributing.md
index 0859ced..e8c97af 100644
--- a/docs/zh/guide/community/contributing.md
+++ b/docs/zh/guide/community/contributing.md
@@ -13,8 +13,12 @@
3、在本地环境中运行`smart-doc`,并确认所做的改动是否生效。可参考 [快速开始](../getting-started) 了解如何启动`smart-doc`并生成`API`文档。
-4、完成修改后,推送提交并提交`Pull Request`给`smart-doc`的主仓库。
-请参考[Pull Request](pull-request-process)流程 来提交合并请求。
+4、完成修改后,推送提交并提交`Pull Request`给`smart-doc`的主仓库。 请参考[Pull Request](pull-request-process)流程 来提交合并请求。
+
+::: tip
+代码需要符合`smart-doc`的代码风格(使用Spring代码风格),请使用`mvn spring-javaformat:apply`命令进行代码格式化。
+推荐下载[Spring Java Format](https://github.com/spring-io/spring-javaformat)插件
+:::
5、等待社区`Committer`审核并合并您的`Pull Request`。
diff --git a/docs/zh/guide/getting-started.md b/docs/zh/guide/getting-started.md
index e690218..1f0bca2 100644
--- a/docs/zh/guide/getting-started.md
+++ b/docs/zh/guide/getting-started.md
@@ -49,7 +49,7 @@
```
-- `includes`中需要调整为项目模块所依赖的包配置`artifactId:groupId`, 支持正则`artifactId:*`
+- `includes`中需要调整为项目模块所依赖的包配置`groupId:artifactId`, 支持正则`artifactId:*`
- `phase`默认为`compile`,如果不需要在执行项目编译时启动`smart-doc`,则将`phase`注释掉
diff --git a/docs/zh/guide/guide.md b/docs/zh/guide/guide.md
index 00ac121..d2d4699 100644
--- a/docs/zh/guide/guide.md
+++ b/docs/zh/guide/guide.md
@@ -283,8 +283,9 @@ public void download(HttpServletResponse response) throws IOException {
outputStream.write(randomStr.getBytes());
}
```
-
-> smart-doc 2.0.2版本将会自动从下载响应头`Content-Disposition: attachment; filename=xx`中读取文件名, 不再需要在响应头中设置`response.setHeader("filename", urlEncode(fileName));`
+:::tip TIPS
+`smart-doc` 2.0.2 版本将会自动从下载响应头`Content-Disposition: attachment; filename=xx`中读取文件名, 不再需要在响应头中设置`response.setHeader("filename", urlEncode(fileName));`
+:::
diff --git a/docs/zh/guide/plugins/maven.md b/docs/zh/guide/plugins/maven.md
index 62ee37e..4887901 100644
--- a/docs/zh/guide/plugins/maven.md
+++ b/docs/zh/guide/plugins/maven.md
@@ -1,4 +1,4 @@
-# Maven
+# Maven
从`smart-doc 1.7.9`开始官方提供了`Maven`插件,可以在项目中通过运行插件来直接生成文档。
## 环境要求
@@ -51,6 +51,7 @@
```
### 插件 configuration
+maven插件的配置信息
#### configFile
指定生成文档的使用的配置文件。相对路径时请用./开头,eg: `./src/main/resources/smart-doc.json`。
如果你通过`mvn`命令来使用插件,那么你也可以通过在命令行中使用`-DconfigFile`参数来指定, 例如:
@@ -66,7 +67,7 @@ mvn -Dfile.encoding=UTF-8 -DconfigFile="src/main/resources/smart-doc.json" sma
`2.3.4`开始, 如果`smart-doc.json`中和此处都未设置`projectName`,插件自动设置为`pom`中的`projectName`
#### excludes & includes
-
+ excludes & includes用于控制源代码的加载。
##### 加载源码机制
`smart-doc`会自动分析依赖树加载所有依赖源码,不过这样会存在两个问题:
- 加载不需要的源码,影响文档构建效率