You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/28 09:23:51 UTC

[GitHub] [apisix] juzhiyuan commented on a diff in pull request #8262: docs: update global-rule/plugin-config/plugin/ docs

juzhiyuan commented on code in PR #8262:
URL: https://github.com/apache/apisix/pull/8262#discussion_r1033296292


##########
docs/en/latest/terminology/plugin-config.md:
##########
@@ -26,45 +26,60 @@ description: Plugin Config in Apache APISIX.
 #
 -->
 
+## Description
+
 Plugin Configs are used to extract commonly used [Plugin](./plugin.md) configurations and can be bound directly to a [Route](./route.md).
 
+While configuring the same plugin, only one copy of the configuration is valid. The order of precedence is always `Consumer` > `Consumer Group` > `Route` > `plugin_config` > `Service`.
+
+## Example
+
 The example below illustrates how to create a Plugin Config and bind it to a Route:
 
-```shell
-curl http://127.0.0.1:9180/apisix/admin/plugin_configs/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
-{
-    "desc": "blah",
-    "plugins": {
-        "limit-count": {
-            "count": 2,
-            "time_window": 60,
-            "rejected_code": 503
+    ```shell

Review Comment:
   Why add some spaces here? 😄



##########
docs/zh/latest/terminology/plugin.md:
##########
@@ -41,13 +61,10 @@ local _M = {
 }
 ```
 
-插件配置可存放于 Route 或 Service 中,键为 `plugins`,值是包含多个插件配置的对象。对象内部用插件名字作为 key 来保存不同插件的配置项。
-
-如下所示的配置中,包含 `limit-count` 和 `prometheus` 两种插件的配置:
+插件的配置信息,可以存放 Route、Service、Plugin Config 等对象中的 `plugins` 参数下。如下所示的配置中,包含 `limit-count` 和 `prometheus` 两个插件的配置信息:
 
 ```json
 {
-    ...

Review Comment:
   🤔 I'm not sure if we should keep this part, as it's inside the Route Object.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org