Summary
Has the project considered adopting JSON Schema for frontmatter validation instead of a separate custom field/type format in _types/*.md?
Context
I'm evaluating mdbase for a typed Markdown collection and the path/type matching model makes sense, but the schema layer appears to reinvent functionality that JSON Schema already covers for validating YAML frontmatter fields.
Examples of the current custom schema surface include:
- custom scalar/object/list field definitions
required, enum, nested fields, nested items
- collection-specific validation semantics layered on top
Question
Was the custom schema format chosen intentionally over JSON Schema for a specific reason?
More concretely:
- Was JSON Schema considered and rejected?
- If so, what limitations made it a poor fit?
- Could
mdbase support JSON Schema for frontmatter validation while keeping the markdown-specific parts (match.path_glob, link, query/formula features, rename semantics, etc.) in its own config layer?
- If not, what is the main advantage of the current custom schema format over reusing JSON Schema for field validation?
Why I'm asking
From a consumer perspective, JSON Schema would seem to offer a few advantages:
- reuse of existing tooling and validators
- less custom syntax to learn
- easier interoperability with TypeScript/codegen/editor tooling
- a clearer separation between document validation and collection-specific behavior
I can see why mdbase needs custom collection behavior, but I don't yet see why that necessarily implies a custom field schema language too.
Curious whether this was a deliberate product decision, an implementation simplification, or something else.
Summary
Has the project considered adopting JSON Schema for frontmatter validation instead of a separate custom field/type format in
_types/*.md?Context
I'm evaluating
mdbasefor a typed Markdown collection and the path/type matching model makes sense, but the schema layer appears to reinvent functionality that JSON Schema already covers for validating YAML frontmatter fields.Examples of the current custom schema surface include:
required,enum, nestedfields, nesteditemsQuestion
Was the custom schema format chosen intentionally over JSON Schema for a specific reason?
More concretely:
mdbasesupport JSON Schema for frontmatter validation while keeping the markdown-specific parts (match.path_glob,link, query/formula features, rename semantics, etc.) in its own config layer?Why I'm asking
From a consumer perspective, JSON Schema would seem to offer a few advantages:
I can see why
mdbaseneeds custom collection behavior, but I don't yet see why that necessarily implies a custom field schema language too.Curious whether this was a deliberate product decision, an implementation simplification, or something else.