Skip to main content

Crate jsoncompat

Crate jsoncompat 

Source
Expand description

Backward-compatibility checks for evolving JSON Schema documents and OpenAPI 3.1 contracts.

Build input documents with SchemaDocument::from_json, then call check_compat with a Role. This crate intentionally exposes only the document-level JSON Schema compatibility API; lower-level resolved IR types live in json_schema_ast. OpenAPI validation and lowering live in the sibling jsoncompat_openapi crate; this crate layers compatibility reports over those lowered request and response schemas.

Structs§

AnalysisOptions
Deterministic counterexample search bounds. Static proofs and explicit schema literals are checked even when the generated-candidate budget is zero.
OpenApiCompatibilityIssue
OpenApiCompatibilityReport
OpenApiDocument
SchemaDocument
Fully resolved JSON Schema document.
SchemaHistory
SchemaOptions
Resource retrieval is explicit and offline. Format assertions default to the vocabulary selected by $schema; standard Draft 2020-12 formats annotate.
SchemaVersionEntry
StampBundle
StampManifest
StampResult

Enums§

CompatibilityError
Compatibility-check failures that are distinct from a proven incompatibility.
CompatibilityResult
OpenApiCompatibilityError
OpenApiCompatibilityIssueKind
Removed operations are structural breaks; schema breaks carry a validated value. An unsuccessful inclusion proof alone is explicitly unknown.
OpenApiCompatibilitySurface
OpenApiError
OpenApiLoweringError
Role
The role under which a compatibility check is performed.
StampError
StampStatus

Constants§

ENVELOPE_DATA_KEY
ENVELOPE_VERSION_KEY
STAMP_MANIFEST_VERSION

Functions§

analyze_compat
Prove compatibility or find a concrete counterexample. Failure to do either is explicitly unknown, including unsupported structural expansions.
analyze_compat_with_options
canonical_schema_hash
check_compat
Return whether new is backward-compatible with old under role.
check_openapi_compat
explain_compat_failure
Return a best-effort static explanation for the first incompatibility under role, or Ok(None) when the checker finds no incompatibility to explain.
stamp_schema
validate_compatibility_input
Return whether this schema can participate in compatibility checks.
validate_openapi_compatibility_input
Return whether an OpenAPI document is fully supported by the compatibility layer.
write_stamp_manifest_atomic

Type Aliases§

SchemaBuildError
Public schema-build error name used by SchemaDocument::from_json.