# `ConduitMcp.Client.SchemaValidator.JSV`
[🔗](https://github.com/nyo16/conduit_mcp/blob/v0.11.0/lib/conduit_mcp/client/schema_validator/jsv.ex#L2)

The default `ConduitMcp.Client.SchemaValidator`, built on
[JSV](https://hex.pm/packages/jsv) (JSON Schema 2020-12 and draft 7).

Only compiled when the optional `{:jsv, "~> 0.26"}` dependency is
present; `ConduitMcp.OptionalDeps.jsv!/0` checks for it when a client's
options ask for validation.

Server schemas are untrusted, so they are built with JSV's default
resolvers only (embedded meta-schemas and the schema's own documents:
never the network), with no atom-creating casts, with build warnings
silenced, and with JSV's `jsv-cast` / `x-jsv-cast` extension keywords
removed; data is validated with casting off. JSV runs `pattern` and
`patternProperties` under a backtracking budget linear in the subject
size, so a catastrophic pattern such as `(a+)+$` fails the value instead
of hanging the caller. Schemas reach `build/2` only after
`ConduitMcp.Client.SchemaValidator.check_bounds/1`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
