Skip to content

Leveraging JSON Schema #163

Description

@meleksomai

The package relies today on its own schema definition in defineDocumentType for local content definition.

What I would like to ask if whether JSON Schema can be leveraged instead. The side effect is then that the schema definition is separate from the computed fields which is perhaps a good thing.

import MyJsonSchema from 'myschema/test';

const Doc = defineDocumentType(() => ({
  name: 'Doc',
  filePathPattern: '**/*.md',
  schema: MyJsonSchema,
  computedFields: {
 ....
}
}))

The missing piece is that I don't know whether this impacts the architecture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions