smile-luobin commented on code in PR #6943: URL: https://github.com/apache/apisix/pull/6943#discussion_r859348863
########## docs/en/latest/plugins/request-validation.md: ########## @@ -55,9 +55,9 @@ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: edd1c9f034335f13 "properties": { "required_payload": {"type": "string"}, "boolean_payload": {"type": "boolean"} - }, - "rejected_msg": "customize reject message" - } + } + }, + "rejected_msg": "customize reject message" Review Comment: the 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"}} } } https://github.com/apache/apisix/blob/7b4bbba6b9a62a10d41c2a93e386eab98b138de3/apisix/plugins/request-validation.lua#L23 `rejected_msg` and `rejected_code` are properties of `schema` instead of `body_schema` or `header_schema`. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
