You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently embed metadata (hierarchy, aliases, allowSkipLevels, allowSelfRef, rules) in schema ._metadata. This metadata is not validated by JSON Schema and could benefit from explicit validation.
Proposed Options
Extend JSON Schema: Create a schema definition that extends the standard JSON Schema to explicitly validate metadata fields while maintaining compatibility with existing JSON Schema validators.
Separate metadata file: Create a parallel metadata file (e.g., schema-name.metadata.json) that would be validated independently.
Requirements
Validate that hierarchy is a non-empty array of strings
Validate that aliases is an object mapping string → string
Validate that allowSkipLevels is a boolean (default false)
Validate that allowSelfRef is an array of strings
Validate that rules follows the RulesMetadata structure (validation/coherence/best-practice arrays)
Maintain backward compatibility with schemas that don't define all metadata fields
Preference
Per discussion, preference is for Option 1 (extend JSON Schema) to keep metadata and schema in one file, but this requires careful design to avoid breaking JSON Schema validators.
This issue depends on #33 (Support full cross-schema resolution of refs) - to validate schema metadata, we need to be able to resolve all references to ensure metadata is complete and consistent.
Activity
mindsocket commentedon Mar 9, 2026
This issue depends on #33 (Support full cross-schema resolution of refs) - to validate schema metadata, we need to be able to resolve all references to ensure metadata is complete and consistent.