config.version selects which validator evaluates your schema:
kong (the default): Kong’s own schema format. See Schema format.
draft4, draft6, draft7, draft201909, or draft202012: the matching JSON Schema Draft-compliant validator.
By default, a failed validation returns a generic 400 Bad Request. Enable config.verbose_response to have the response name the specific field that failed instead.
The Policy can restrict which Content-Type values it accepts, using config.allowed_content_types (default application/json). A request with a Content-Type that isn’t in this list is rejected with 400 Bad Request and {"message":"specified Content-Type is not allowed"}, regardless of whether the body itself would otherwise have passed schema validation. Use config.content_type_parameter_validation to control whether Content-Type parameters (like ; charset=UTF-8) are also validated.
When config.version is kong (the default), config.body_schema is a JSON-encoded array of single-key field definitions, using Kong’s own schema types rather than plain JSON Schema:
array requires an elements sub-schema describing each item’s type.
record requires a fields array of single-key {field_name: {type: ...}} objects, describing an object’s shape.
map requires keys and values sub-schemas.
See Validate an LLM chat request body for an example that combines array and record.