package mcp-kit

  1. Overview
  2. Docs

Module Jsonschema_core.ErrorSource

Validation error types.

Errors carry both the instance path (where in the data) and the schema path (which keyword). Combinator keywords (allOf, anyOf, etc.) attach sub-errors in context.

Sourcetype t = {
  1. instance_path : Json_pointer.t;
  2. schema_path : Json_pointer.t;
  3. keyword : string;
  4. message : string;
  5. context : t list;
}

A validation error.

Sourceval make : instance_path:Json_pointer.t -> schema_path:Json_pointer.t -> keyword:string -> string -> t

Create an error at the given paths.

Sourceval make_with_context : instance_path:Json_pointer.t -> schema_path:Json_pointer.t -> keyword:string -> context:t list -> string -> t

Create an error with sub-errors (for combinators like allOf, anyOf).

Sourceval to_string : t -> string

Format error as human-readable string (for debugging).