tokers commented on a change in pull request #3317:
URL: https://github.com/apache/apisix/pull/3317#discussion_r559327325
##########
File path: doc/admin-api.md
##########
@@ -688,6 +689,31 @@ Config Example:
}
```
+## Global Rule
+
+*API*:/apisix/admin/global_rules/{id}
+
+*Description*: Set plugins which run globally. Those plugins will be run
before any Route/Service level plugins.
+
+> Request Methods:
+
+|Method |Request URI|Request Body|Description |
+|---------|-------------------------|--|------|
+|GET |/apisix/admin/global_rules|NULL|Fetch resource list|
+|GET |/apisix/admin/global_rules/{id}|NULL|Fetch resource|
+|PUT |/apisix/admin/global_rules/{id}|{...}|Create resource by ID|
+|DELETE |/apisix/admin/global_rules/{id}|NULL|Remove resource|
+|PATCH |/apisix/admin/global_rules/{id}|{...}|Standard PATCH. Update some
attributes of the existing Route, and other attributes not involved will remain
as they are; if you want to delete an attribute, set the value of the attribute
Set to null to delete; especially, when the value of the attribute is an array,
the attribute will be updated in full|
Review comment:
`Update some attributes of the existing Route` should be `Update some
attributes of the existing global_rule`.
##########
File path: doc/zh-cn/admin-api.md
##########
@@ -695,6 +696,31 @@ ssl 对象 json 配置内容:
}
```
+## Global Rule
+
+*地址*:/apisix/admin/global_rules/{id}
+
+*说明*:设置全局运行的插件。这一类插件在所有路由级别的插件之前优先运行。
+
+> 请求方法:
+
+|名字 |请求 uri|请求 body|说明 |
+|---------|-------------------------|--|------|
+|GET |/apisix/admin/global_rules|无|获取资源列表|
+|GET |/apisix/admin/global_rules/{id}|无|获取资源|
+|PUT |/apisix/admin/global_rules/{id}|{...}|根据 id 创建资源|
+|DELETE |/apisix/admin/global_rules/{id}|无|删除资源|
+|PATCH |/apisix/admin/global_rules/{id}|{...}|标准 PATCH ,修改已有 Route
的部分属性,其他不涉及的属性会原样保留;如果你要删除某个属性,将该属性的值设置为null 即可删除;特别地,当需要修改属性的值为数组时,该属性将全量更新|
Review comment:
`修改已有 Route 的部分属性` should be `修改已有 Global rule 的部分属性`.
##########
File path: doc/admin-api.md
##########
@@ -688,6 +689,31 @@ Config Example:
}
```
+## Global Rule
+
+*API*:/apisix/admin/global_rules/{id}
+
+*Description*: Set plugins which run globally. Those plugins will be run
before any Route/Service level plugins.
+
+> Request Methods:
+
+|Method |Request URI|Request Body|Description |
+|---------|-------------------------|--|------|
+|GET |/apisix/admin/global_rules|NULL|Fetch resource list|
+|GET |/apisix/admin/global_rules/{id}|NULL|Fetch resource|
+|PUT |/apisix/admin/global_rules/{id}|{...}|Create resource by ID|
+|DELETE |/apisix/admin/global_rules/{id}|NULL|Remove resource|
+|PATCH |/apisix/admin/global_rules/{id}|{...}|Standard PATCH. Update some
attributes of the existing Route, and other attributes not involved will remain
as they are; if you want to delete an attribute, set the value of the attribute
Set to null to delete; especially, when the value of the attribute is an array,
the attribute will be updated in full|
+|PATCH |/apisix/admin/global_rules/{id}/{path}|{...}|SubPath PATCH, specify
the attribute of Route to be updated through {path}, update the value of this
attribute in full, and other attributes that are not involved will remain as
they are.|
Review comment:
`specify the attribute of Route to be updated through ` should be
`specify the attribute of Global rule to be updated through`.
##########
File path: doc/zh-cn/admin-api.md
##########
@@ -695,6 +696,31 @@ ssl 对象 json 配置内容:
}
```
+## Global Rule
+
+*地址*:/apisix/admin/global_rules/{id}
+
+*说明*:设置全局运行的插件。这一类插件在所有路由级别的插件之前优先运行。
+
+> 请求方法:
+
+|名字 |请求 uri|请求 body|说明 |
+|---------|-------------------------|--|------|
+|GET |/apisix/admin/global_rules|无|获取资源列表|
+|GET |/apisix/admin/global_rules/{id}|无|获取资源|
+|PUT |/apisix/admin/global_rules/{id}|{...}|根据 id 创建资源|
+|DELETE |/apisix/admin/global_rules/{id}|无|删除资源|
+|PATCH |/apisix/admin/global_rules/{id}|{...}|标准 PATCH ,修改已有 Route
的部分属性,其他不涉及的属性会原样保留;如果你要删除某个属性,将该属性的值设置为null 即可删除;特别地,当需要修改属性的值为数组时,该属性将全量更新|
+|PATCH |/apisix/admin/global_rules/{id}/{path}|{...}|SubPath PATCH,通过
{path} 指定 Route 要更新的属性,全量更新该属性的数据,其他不涉及的属性会原样保留。|
Review comment:
`指定 Route 要更新的属性 ` Should be `指定 Global rule 要更新的属性`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]