AlinsRan commented on code in PR #12424: URL: https://github.com/apache/apisix/pull/12424#discussion_r2209214038
########## apisix/admin/consumers.lua: ########## @@ -36,7 +37,7 @@ local function check_conf(username, conf, need_username, schema) end end - if conf.group_id then + if conf.group_id and not opts.skip_references_check then Review Comment: Nil or false are default values and will not skip reference checks When set to true, only standalone will be used and it will skip the reference check ```lua local opts_tests ={ {}, { skip_references_check = nil, }, { skip_references_check = false, }, { skip_references_check = true, }, } local inspect = require("inspect") for i, opt in ipairs(opts_tests) do if not opt.skip_references_check then print("fase ----- skip_references_check = false, Test " .. i, ": " .. inspect(opt)) else print("true ------ skip_references_check = true, Test " .. i, ": " .. inspect(opt)) end end ``` result: ```bash fase ----- skip_references_check = false, Test 1: {} fase ----- skip_references_check = false, Test 2: {} fase ----- skip_references_check = false, Test 3: { skip_references_check = false } true ------ skip_references_check = true, Test 4: { skip_references_check = true } ``` -- 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-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org