This is an automated email from the ASF dual-hosted git repository.

membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 6ffd8b9  doc: Chinese version of plugins request-id (#2103)
6ffd8b9 is described below

commit 6ffd8b9956e4e923fac5f6b6cbfdecd22a18e3b8
Author: Shuyang Wu <wosoyo...@gmail.com>
AuthorDate: Sun Aug 23 11:17:18 2020 +0800

    doc: Chinese version of plugins request-id (#2103)
    
    fix #2027
---
 doc/plugins/request-id.md               |  4 +--
 doc/{ => zh-cn}/plugins/request-id.md   | 43 ++++++++++++++++-----------------
 doc/zh-cn/plugins/request-validation.md |  4 +--
 3 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/doc/plugins/request-id.md b/doc/plugins/request-id.md
index 0857e0e..ad852a0 100644
--- a/doc/plugins/request-id.md
+++ b/doc/plugins/request-id.md
@@ -17,7 +17,7 @@
 #
 -->
 
-[Chinese](../zh-cn/plugins/request-validation.md)
+[Chinese](../zh-cn/plugins/request-id.md)
 
 # Summary
 - [**Name**](#name)
@@ -71,7 +71,7 @@ HTTP/1.1 200 OK
 
 ## Disable Plugin
 
-Remove the corresponding json configuration in the plugin configuration to 
disable the `request-validation`.
+Remove the corresponding json configuration in the plugin configuration to 
disable the `request-id`.
 APISIX plugins are hot-reloaded, therefore no need to restart APISIX.
 
 ```shell
diff --git a/doc/plugins/request-id.md b/doc/zh-cn/plugins/request-id.md
similarity index 57%
copy from doc/plugins/request-id.md
copy to doc/zh-cn/plugins/request-id.md
index 0857e0e..17fdcac 100644
--- a/doc/plugins/request-id.md
+++ b/doc/zh-cn/plugins/request-id.md
@@ -17,32 +17,32 @@
 #
 -->
 
-[Chinese](../zh-cn/plugins/request-validation.md)
+[English](../plugins/request-id.md)
 
-# Summary
-- [**Name**](#name)
-- [**Attributes**](#attributes)
-- [**How To Enable**](#how-to-enable)
-- [**Test Plugin**](#test-plugin)
-- [**Disable Plugin**](#disable-plugin)
-- [**Examples**](#examples)
+# 目录
 
+- [**名称**](#名称)
+- [**属性**](#属性)
+- [**如何启用**](#如何启用)
+- [**测试插件**](#测试插件)
+- [**禁用插件**](#禁用插件)
+- [**示例**](#示例)
 
-## Name
 
-`request-id` plugin adds a unique ID (UUID) to each request proxied through 
APISIX. This plugin can be used to track an
-API request. The plugin will not add a request id if the `header_name` is 
already present in the request.
+## 名称
 
-## Attributes
+`request-id` 插件通过 APISIX 为每一个请求代理添加唯一 ID(UUID),以用于追踪 API 请求。该插件在 `header_name` 
已经在请求中存在时不会为请求添加新的 ID
 
-|Name           |Requirement    |Description|
-|---------      |--------       |-----------|
-| header_name   |optional       |Request ID header name (default: 
X-Request-Id)|
-| include_in_response   |optional       |Option to include the unique request 
ID in the response header (default: true)|
+## 属性
 
-## How To Enable
+| 名称                | 必选项 | 描述                                        |
+| ------------------- | ------ | ------------------------------------------- |
+| header_name         | 可选   | Request ID header name (默认: X-Request-Id) |
+| include_in_response | 可选   | 是否需要在返回头中包含该唯一ID (默认: true) |
 
-Create a route and enable the request-id plugin on the route:
+## 如何启用
+
+创建一条路由并在该路由上启用 `request-id` 插件:
 
 ```shell
 curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
@@ -62,17 +62,16 @@ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 
'X-API-KEY: edd1c9f034335f13
 }
 ```
 
-## Test Plugin
+## 测试插件
 
 ```shell
 $ curl -i http://127.0.0.1:9080/hello
 HTTP/1.1 200 OK
 ```
 
-## Disable Plugin
+## 禁用插件
 
-Remove the corresponding json configuration in the plugin configuration to 
disable the `request-validation`.
-APISIX plugins are hot-reloaded, therefore no need to restart APISIX.
+在路由 `plugins` 配置块中删除 `request-id 配置,即可禁用该插件,无需重启 APISIX。
 
 ```shell
 curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
diff --git a/doc/zh-cn/plugins/request-validation.md 
b/doc/zh-cn/plugins/request-validation.md
index 6142ef1..1c94d02 100644
--- a/doc/zh-cn/plugins/request-validation.md
+++ b/doc/zh-cn/plugins/request-validation.md
@@ -20,14 +20,14 @@
 - [English](../../plugins/request-validation.md)
 
 # 目录
-- [**名字**](#名字)
+- [**名称**](#名称)
 - [**属性**](#属性)
 - [**如何启用**](#如何启用)
 - [**测试插件**](#测试插件)
 - [**禁用插件**](#禁用插件)
 - [**示例**](#示例)
 
-## 名字
+## 名称
 
 `request-validation` 插件用于提前验证请求向上游转发请求,可以验证请求的 `body` 及 `header` 数据。
 

Reply via email to