Skip to content

Key schema definition traits by schema type - #138

Open
adampetro wants to merge 2 commits into
mainfrom
ap.schema-definition-associated-types
Open

Key schema definition traits by schema type#138
adampetro wants to merge 2 commits into
mainfrom
ap.schema-definition-associated-types

Conversation

@adampetro

@adampetro adampetro commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Add a SchemaDefinition association to each schema-owned definition trait.
  • Remove associated types that duplicate members of the schema family.
  • Key type, input type, and output type references by their schema definition.
  • Make each schema own one canonical input type and one canonical output type.
  • Keep alternate variable-definition traversal inside the validator with private, static-dispatch input views.
  • Update parser, visibility, validator, schema comparator, and type generation code.

Why

The previous API repeated structural equality bounds across the definition traits. The new API makes SchemaDefinition the owner of the complete definition type family. This reduces generic bounds and prevents references from different schema families from being mixed.

The core input and output references now depend only on the schema definition. Validator-specific variable types no longer add representation parameters to the public core API.

Compatibility

This change updates public traits and reference types. It is a source-breaking change and needs a minor version release.

Validation

  • cargo check --workspace --all-features
  • cargo test --workspace --all-features
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Assisted-By: devx/d679ffab-df3b-41b6-b9d9-d39223d17670
Assisted-By: devx/d679ffab-df3b-41b6-b9d9-d39223d17670
@adampetro
adampetro marked this pull request as ready for review August 26, 2026 21:22
@adampetro
adampetro requested a review from swalkinshaw August 26, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant