diff --git a/docs/advanced/config.md b/docs/advanced/config.md index 70ff74f..53e98be 100644 --- a/docs/advanced/config.md +++ b/docs/advanced/config.md @@ -62,6 +62,7 @@ | `apiUploadNums` | `3.0.2` | ❌ | `Integer` | | When uploading `Torna`, batch uploading of documents is supported, and the size of document batches can be set. | | `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. | ```json { @@ -100,6 +101,8 @@ "debugEnvName": "Test ENV", "debugEnvUrl": "http://127.0.0.1", "tornaDebug": false, + "author": "smart-doc", + "increment": false, "ignoreRequestParams": [ "org.springframework.ui.ModelMap" ], @@ -142,7 +145,7 @@ "customResponseFields": [ { "name": "code", - "desc": "code", + "desc": "response code", "ownerClassName": "org.springframework.data.domain.Pageable", "ignore": true, "value": "00000" @@ -151,7 +154,7 @@ "customRequestFields": [ { "name": "code", - "desc": "code", + "desc": "status code", "ownerClassName": "com.xxx.constant.entity.Result", "value": "200", "required": true, @@ -230,19 +233,19 @@ }, "groups": [ { - "name": "Test Group", + "name": "test group", "apis": "com.power.doc.controller.app.*" } ], "requestParamsTable": true, "responseParamsTable": true, - "componentType": 1, - "apiUploadNums": 1 + "componentType": "RANDOM", + "jmeter": { + "addPrometheusListener": true + }, + "addDefaultHttpStatuses": true } ``` - - - ## packageFilters `Controller` packet filtering, multiple packets are separated by commas. diff --git a/docs/zh-cn/advanced/config.md b/docs/zh-cn/advanced/config.md index 6fdaa5b..084aca8 100644 --- a/docs/zh-cn/advanced/config.md +++ b/docs/zh-cn/advanced/config.md @@ -64,6 +64,7 @@ | `apiUploadNums` | `3.0.2` | ❌ | `Integer` | | 上传`torna`时,支持文档分批上传,设置文档批次的大小。不配置则一次上传所有 | | `showValidation` | `3.0.3` | ❌ | `Boolean` | `true` | `showValidation`用于控制`smart-doc`是否提取JSR字段验证信息展示到文档中 | | `jmeter` | `3.0.4` | ❌ | `Object` | | 生成`JMeter`性能测试脚本一些配置。 | +| `addDefaultHttpStatuses` | `3.0.5` | ❌ | `Boolean` | `false` | 生成文档时是否添加框架默认的`http`状态码,例如`Spring MVC`默认的`500`和`404`, 当前只有生成`OenAPI`文档时支持。 | ```json { @@ -99,7 +100,7 @@ "appToken": "c16931fa6590483fb7a4e85340fcbfef", "isReplace": true, "openUrl": "http://localhost:7700/api", - "debugEnvName": "测试环境", + "debugEnvName": "Test ENV", "debugEnvUrl": "http://127.0.0.1", "tornaDebug": false, "author": "smart-doc", @@ -109,7 +110,7 @@ ], "dataDictionaries": [ { - "title": "http状态码字典", + "title": "http status", "enumClassName": "com.power.common.enums.HttpCodeEnum", "codeField": "code", "descField": "message" @@ -146,7 +147,7 @@ "customResponseFields": [ { "name": "code", - "desc": "响应代码", + "desc": "response code", "ownerClassName": "org.springframework.data.domain.Pageable", "ignore": true, "value": "00000" @@ -155,7 +156,7 @@ "customRequestFields": [ { "name": "code", - "desc": "状态码", + "desc": "status code", "ownerClassName": "com.xxx.constant.entity.Result", "value": "200", "required": true, @@ -167,7 +168,7 @@ "name": "token", "type": "string", "desc": "desc", - "value": "token请求头的值", + "value": "token value", "required": false, "since": "-", "pathPatterns": "/app/test/**", @@ -177,7 +178,7 @@ "name": "appkey", "type": "string", "desc": "desc", - "value": "appkey请求头的值", + "value": "appkey value", "required": false, "pathPatterns": "/test/add,/testConstants/1.0", "since": "-" @@ -234,16 +235,17 @@ }, "groups": [ { - "name": "测试分组", + "name": "test group", "apis": "com.power.doc.controller.app.*" } ], "requestParamsTable": true, "responseParamsTable": true, - "componentType": 1, + "componentType": "RANDOM", "jmeter": { "addPrometheusListener": true - } + }, + "addDefaultHttpStatuses": true } ```