membphis commented on a change in pull request #1022: Feature/chash key support more flexible ways URL: https://github.com/apache/incubator-apisix/pull/1022#discussion_r363146529
########## File path: lua/apisix/admin/upstreams.lua ########## @@ -45,23 +98,17 @@ local function check_conf(id, conf, need_id) if need_id and conf.id and tostring(conf.id) ~= tostring(id) then return nil, {error_msg = "wrong upstream id"} end - core.log.info("schema: ", core.json.delay_encode(core.schema.upstream)) core.log.info("conf : ", core.json.delay_encode(conf)) - local ok, err = core.schema.check(core.schema.upstream, conf) + local ok, err = check_upstream_conf(conf) if not ok then - return nil, {error_msg = "invalid configuration: " .. err} + return nil, err Review comment: Why did you lose this layer of Lua table? ---------------------------------------------------------------- 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 With regards, Apache Git Services