membphis commented on a change in pull request #2886:
URL: https://github.com/apache/apisix/pull/2886#discussion_r543394249



##########
File path: doc/zh-cn/admin-api.md
##########
@@ -754,3 +754,15 @@ Content-Type: text/plain
 ```
 
 [Back to TOC](#目录)
+
+*地址*:/apisix/admin/plugins/?all=true
+
+*说明*: 所有插件的所有属性,每个插件包括 `name`, `priority`, `priority`, `schema`, 
`consumer_schema` and `version`。

Review comment:
       duplicated `priority`

##########
File path: doc/admin-api.md
##########
@@ -744,3 +744,15 @@ Content-Type: text/plain
 ```
 
 [Back to TOC](#Table-of-Contents)
+
+*API*:/apisix/admin/plugins/?all=true
+
+*Description*: all the attributes of all plugins, each plug-in includes 
`name`, `priority`, `priority`, `schema`, `consumer_schema` and `version`.

Review comment:
       duplicated `priority`

##########
File path: t/admin/plugins.t
##########
@@ -162,3 +162,65 @@ plugins:
     }
 --- no_error_log
 [error]
+
+
+
+=== TEST 8: get all the attributes of all plugins
+--- config
+    location /t {
+        content_by_lua_block {
+            local json = require("toolkit.json")
+            local t = require("lib.test_admin").test
+
+            local code, message, res = t('/apisix/admin/plugins/?all=true',
+                ngx.HTTP_GET
+            )
+
+            if code >= 300 then
+                ngx.status = code
+                ngx.say(message)
+                return
+            end
+
+            res = json.decode(res)
+            ngx.say(json.encode(res))
+        }
+    }
+--- response_body eval
+qr/\{"name":"example-plugin","priority":0,"schema":\{"properties":\{"i":\{"minimum":0,"type":"number"\},"ip":\{"type":"string"\},"port":\{"type":"integer"\},"s":\{"type":"string"\},"t":\{"minItems":1,"type":"array"\}\},"required":\["i"\],"type":"object"\},"type":"other","version":0.1\}/
+--- no_error_log
+[error]
+
+
+
+=== TEST 9: confirm the plugin of auth type

Review comment:
       more test cases: `priority`, `schema`, `consumer_schema`




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to