Skip to content

Conversation

@smile-luobin
Copy link
Contributor

Signed-off-by: smile-luobin luobin_smile@163.com

Description

fix bugs in doc of request-validation plugin

Signed-off-by: smile-luobin <luobin_smile@163.com>
@smile-luobin smile-luobin changed the title fix-docs: fix bugs in doc of request-validation plugin fix(docs): fix bugs in doc of request-validation plugin Apr 27, 2022
Comment on lines +58 to +60
}
},
"rejected_msg": "customize reject message"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you get an error when you create a route with the command before the modification?

Copy link
Contributor Author

@smile-luobin smile-luobin Apr 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you get an error when you create a route with the command before the modification?

rejected_msg and rejected_code are properties of schema, not body_schema nor header_schema.

the plugin schema defined in request-validataion plugin is:

local schema = {
    type = "object",
    properties = {
        header_schema = {type = "object"},
        body_schema = {type = "object"},
        rejected_code = {type = "integer", minimum = 200, maximum = 599, default = 400},
        rejected_msg = {type = "string", minLength = 1, maxLength = 256}
    },
    anyOf = {
        {required = {"header_schema"}},
        {required = {"body_schema"}}
    }
}

@spacewander spacewander changed the title fix(docs): fix bugs in doc of request-validation plugin docs: fix bugs in doc of request-validation plugin Apr 29, 2022
@spacewander spacewander merged commit f78d045 into apache:master May 5, 2022
@smile-luobin smile-luobin deleted the fix-docs branch May 5, 2022 08:43
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request May 20, 2022
Signed-off-by: smile-luobin <luobin_smile@163.com>
spacewander pushed a commit that referenced this pull request Jun 30, 2022
Signed-off-by: smile-luobin <luobin_smile@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants