Skip to content

fix(rule): skip structure validation when structure is not defined#43

Merged
jackchuka merged 1 commit intomainfrom
fix/skip-structure-when-not-defined
Feb 12, 2026
Merged

fix(rule): skip structure validation when structure is not defined#43
jackchuka merged 1 commit intomainfrom
fix/skip-structure-when-not-defined

Conversation

@jackchuka
Copy link
Owner

Summary

  • Early-return in StructureRule.ValidateWithContext when len(ctx.Schema.Structure) == 0, skipping all structure checks for schemas that only define non-structure rules
  • Added unit test and integration test covering the schema-only (no structure) case

Closes #42

@jackchuka jackchuka merged commit d6e7d55 into main Feb 12, 2026
1 check passed
@jackchuka jackchuka deleted the fix/skip-structure-when-not-defined branch February 12, 2026 02:26
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.

Structure rule runs against documents when schema has no structure defined

1 participant