contentlayerdev / contentlayerdev/contentlayer
Leveraging JSON Schema
Open
feature
- Dominant language
- TypeScript
- Stars
- 3.5k
- Forks
- 192
- PR merge metrics
- No merged PRs in 30d
Description
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.
```js
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.
Contributor guide
Assessment
This issue has not been assessed yet.