Parameters
See plugin common configurations for configuration options available to all plugins.
spec
String containing the OpenAPI spec. Mutually exclusive with
spec_url.The inline spec has a 2 MB size limit imposed by the control plane. If your OpenAPI specification exceeds this limit, use
spec_urlinstead to load the spec from a remote URL.spec_url
URL to fetch the OpenAPI spec from (must start with
http://orhttps://). Mutually exclusive withspec. The fetched spec is cached with a configurable TTL (see plugin metadataspec_url_ttl), and stale entries continue serving requests while the spec refreshes in the background.Available in API7 Enterprise from version 3.9.12 and APISIX from version 3.17.0.
spec_url_request_headers
Custom HTTP headers to include when fetching
spec_url(e.g. for authentication).Available in API7 Enterprise from version 3.9.12 and APISIX from version 3.17.0.
ssl_verify
Whether to verify the SSL certificate when fetching
spec_url.Available in API7 Enterprise from version 3.9.12 and APISIX from version 3.17.0.
timeout
vaild vaule:
1000–60000
HTTP request timeout in milliseconds when fetching
spec_url.Available in API7 Enterprise from version 3.9.12 and APISIX from version 3.17.0.
verbose_errors
If true, respond with detailed error if the validation fails.
skip_request_body_validation
If true, skip the validation of request body.
skip_request_header_validation
If true, skip the validation of request header.
skip_query_param_validation
If true, skip the validation of query parameters.
skip_path_params_validation
If true, skip the validation of path parameters.
reject_if_not_match
If false, requests that fail OAS validation are logged as error but the request is still forwarded to the upstream service.
Available in API7 Enterprise from 3.9.6 and APISIX from version 3.17.0.
rejection_status_code
vaild vaule:
400–599
HTTP status code to return when request validation fails. For example, set to
422to distinguish semantic validation errors (Unprocessable Entity) from malformed request syntax (400Bad Request). Only effective whenreject_if_not_matchistrue.Available in API7 Enterprise from version 3.9.8 and APISIX from version 3.17.0.
max_req_body_size
Maximum request body size in bytes buffered into memory. Larger request bodies are rejected. Available in API7 Enterprise from version 3.9.17 on the 3.9 line and from version 3.10.4 on the 3.10 line.
One of spec or spec_url must be configured. They are mutually exclusive.
Plugin Metadata
spec_url_ttl
TTL in seconds for cached specs fetched from
spec_url. After expiry, stale entries continue serving requests while the spec refreshes asynchronously in the background.Available in API7 Enterprise from version 3.9.12 and APISIX from version 3.17.0.