Current Behavior
The consumers does not support inputs that contain a modifiedIndex field.
The core.config.new(“/consumers”, cfg) does not include an item_schema input similar to the other resources because consumers needs to handle both consumer and consumer_credential resources under the same key.
It just passes in a function that checks the schema and determines the resource type by key and performs specific checks if needed.
The additional field modifiedIndex that we have now introduced in config_yaml cannot be applied to the internal check function of consumers, so the check will output an error.
Expected Behavior
Consistent with other resources.
Error Logs
invalid consumers at index 0, err: additional properties forbidden, found modifiedIndex
Steps to Reproduce
- Use the API to submit a consumer containing the
modifiedIndex.
Environment
- APISIX version (run
apisix version): master
- Operating system (run
uname -a): N/A
- OpenResty / Nginx version (run
openresty -V or nginx -V): N/A
- etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info): N/A
- APISIX Dashboard version, if relevant: N/A
- Plugin runner version, for issues related to plugin runners: N/A
- LuaRocks version, for installation issues (run
luarocks --version): N/A
Current Behavior
The
consumersdoes not support inputs that contain amodifiedIndexfield.The
core.config.new(“/consumers”, cfg)does not include anitem_schemainput similar to the other resources because consumers needs to handle both consumer and consumer_credential resources under the same key.It just passes in a function that checks the schema and determines the resource type by key and performs specific checks if needed.
The additional field
modifiedIndexthat we have now introduced in config_yaml cannot be applied to the internal check function of consumers, so the check will output an error.Expected Behavior
Consistent with other resources.
Error Logs
Steps to Reproduce
modifiedIndex.Environment
apisix version): masteruname -a): N/Aopenresty -Vornginx -V): N/Acurl http://127.0.0.1:9090/v1/server_info): N/Aluarocks --version): N/A