We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
wrong case:
local schema = { type = "object", oneOf = { { title = "work with consumer object", properties = { access_key = {type = "string", minLength = 1, maxLength = 256}, secret_key = {type = "string", minLength = 1, maxLength = 256}, algorithm = { type = "string", enum = {"hmac-sha1", "hmac-sha256", "hmac-sha512"}, default = "hmac-sha256" }, clock_skew = { type = "integer", default = 300 }, signed_headers = { type = "array", items = { type = "string", minLength = 1, maxLength = 20, } }, }, required = {"access_key", "secret_key"}, additionalProperties = false, }, }, { title = "work with route or service object", properties = {}, additionalProperties = false, } } local validator = jsonschema.generate_validator(schema) local conf = {} local ok = validator(conf) if not ok then ngx.say("value checking failure") return end
If I change the order of items of the schema object , it will be ok:
local schema = { type = "object", oneOf = { { title = "work with route or service object", properties = {}, additionalProperties = false, }, { title = "work with consumer object", properties = { access_key = {type = "string", minLength = 1, maxLength = 256}, secret_key = {type = "string", minLength = 1, maxLength = 256}, algorithm = { type = "string", enum = {"hmac-sha1", "hmac-sha256", "hmac-sha512"}, default = "hmac-sha256" }, clock_skew = { type = "integer", default = 300 }, signed_headers = { type = "array", items = { type = "string", minLength = 1, maxLength = 20, } }, }, required = {"access_key", "secret_key"}, additionalProperties = false, }, }, } local validator = jsonschema.generate_validator(schema) local conf = {} local ok = validator(conf) if not ok then ngx.say("value checking failure") return end
In the wrong case, conf had been change to {"clock_skew": 300}.
conf
I think this is the reason.
The text was updated successfully, but these errors were encountered:
it seems to be a bug, let we fix it
Sorry, something went wrong.
No branches or pull requests
wrong case:
If I change the order of items of the schema object , it will be ok:
In the wrong case,
conf
had been change to {"clock_skew": 300}.I think this is the reason.
The text was updated successfully, but these errors were encountered: