AttestoMCP.Server.Schema (attesto_mcp_server v0.8.0)

Copy Markdown View Source

Bounded JSON Schema 2020-12 validation without remote reference fetching.

Summary

Functions

Checks that a term can be represented losslessly as JSON.

Validates a JSON-compatible instance against a bounded schema subset.

Validates the bounded modern result variants emitted by this package.

Checks a schema without validating an instance. No network references are fetched.

Functions

json_value(value)

@spec json_value(term()) :: :ok | {:error, :not_json}

Checks that a term can be represented losslessly as JSON.

validate(value, schema)

@spec validate(term(), term()) :: :ok | {:error, term()}

Validates a JSON-compatible instance against a bounded schema subset.

validate_modern_result(result)

@spec validate_modern_result(map()) :: :ok | {:error, term()}

Validates the bounded modern result variants emitted by this package.

validate_schema(schema)

@spec validate_schema(term()) :: :ok | {:error, term()}

Checks a schema without validating an instance. No network references are fetched.