Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leveraging JSON Schema #163

Open
meleksomai opened this issue Mar 29, 2022 · 0 comments
Open

Leveraging JSON Schema #163

meleksomai opened this issue Mar 29, 2022 · 0 comments
Labels
feature New feature or request

Comments

@meleksomai
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants