contentlayerdev / contentlayerdev/contentlayer
Leveraging JSON Schema
Abierto
feature
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.5k
- Forks
- 192
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.