AlinsRan commented on code in PR #12424:
URL: https://github.com/apache/apisix/pull/12424#discussion_r2204427322


##########
apisix/admin/consumers.lua:
##########
@@ -60,6 +60,11 @@ return resource.new({
     name = "consumers",
     kind = "consumer",
     schema = core.schema.consumer,
-    checker = check_conf,
+    checker = function (username, conf, need_username, schema)
+        return check_conf(username, conf, need_username, schema, false)
+    end,
+    standalone_checker = function (username, conf, need_username, schema)
+        return check_conf(username, conf, need_username, schema, true)
+    end,

Review Comment:
   
https://github.com/apache/apisix/blob/eed93f315c917e7bedcddf18d7df56af556cb918/apisix/admin/resource.lua#L126
   
   I had intended to make this change before, but I found that some resources 
may have more than just four parameters
    So my idea is to create two independent checkers as much as possible to 
reflect the differences



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to