-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(limit-count): keep the counter if the plugin conf is the same #6151
Conversation
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
-- This method produces the same encoded string when the input is not changed. | ||
-- Different calls with cjson.encode will produce different string because | ||
-- it doesn't maintain the object key order. | ||
stably_encode = require("dkjson").encode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much needed feature : )
@@ -63,7 +63,7 @@ __DATA__ | |||
GET /t | |||
--- error_code: 400 | |||
--- response_body | |||
{"error_msg":"failed to check the configuration of plugin limit-count err: failed to validate dependent schema for \"policy\": value should match only one schema, but matches none"} | |||
{"error_msg":"failed to check the configuration of plugin limit-count err: else clause did not match"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error messages is confusing after changes, it cannot help API callers troubleshoot effectively, will we have some enhancements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. We can improve it in the jsonschema library.
Signed-off-by: spacewander spacewanderlzx@gmail.com
What this PR does / why we need it:
Pre-submission checklist: