Docs
Plugin HubCategoriesTraffic ManagementRequest ValidationConfiguration

Request Validation Configuration

Configuration reference for the Request Validation plugin (`request-validation`): the parameters, each attribute with its type, whether it is required, its default and its accepted values.

Parameters

See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.

header_schema — object · optional · since APISIX 1.5

Schema for request header.

At lease one of the header_schema and body_schema should be configured.

body_schema — object · optional · since APISIX 1.5

Schema for request body.

At lease one of the header_schema and body_schema should be configured.

rejected_code — integer · optional · default: 400 · since APISIX 2.12.0

Valid values: between 200 and 599 inclusive

Status code to return when rejecting requests.

rejected_msg — string · optional · since APISIX 2.11.0

Message to return when rejecting requests.

max_req_body_size — integer · optional · default: 67108864 · since APISIX 3.18.0 · API7 Gateway 3.9.17

Valid values: greater than or equal to 1

Maximum request body size in bytes read when body_schema is configured. A larger body is rejected with rejected_code, which defaults to 400. This field has no effect when only header_schema is configured. Introduced in API7 Enterprise 3.9.17 and 3.10.4, and APISIX 3.18.0.