{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/RequestValidatorPluginConfig", "title": "RequestValidatorPluginConfig", "x-speakeasy-entity": "PluginRequestValidator", "properties": { "config": { "type": "object", "properties": { "allowed_content_types": { "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", "type": "array", "items": { "type": "string" }, "default": [ "application/json" ] }, "body_schema": { "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", "type": "string" }, "content_type_parameter_validation": { "description": "Determines whether to enable parameters validation of request content-type.", "type": "boolean", "default": true }, "parameter_schema": { "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", "type": "array", "items": { "properties": { "explode": { "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", "type": "boolean" }, "in": { "description": "The location of the parameter.", "type": "string", "enum": [ "header", "path", "query" ] }, "name": { "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", "type": "string" }, "required": { "description": "Determines whether this parameter is mandatory.", "type": "boolean" }, "schema": { "description": "Required when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", "type": "string" }, "style": { "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", "type": "string", "enum": [ "deepObject", "form", "label", "matrix", "pipeDelimited", "simple", "spaceDelimited" ] } }, "required": [ "in", "name", "required" ], "type": "object" } }, "verbose_response": { "description": "If enabled, the plugin returns more verbose and detailed validation errors.", "type": "boolean", "default": false }, "version": { "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4`, `draft7`, `draft201909`, and `draft202012` for using their respective JSON Schema Draft compliant validators.", "type": "string", "default": "kong", "enum": [ "draft201909", "draft202012", "draft4", "draft6", "draft7", "kong" ] } } }, "consumer": { "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } } }, "name": { "const": "request-validator" }, "protocols": { "description": "A set of strings representing HTTP protocols.", "type": "array", "items": { "enum": [ "grpc", "grpcs", "http", "https" ], "type": "string" }, "format": "set", "default": [ "grpc", "grpcs", "http", "https" ] }, "route": { "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } } }, "service": { "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } } } } }