[DX] Automatically generate schemas from component props in `content.config.ts`
Opening this issue after a quick discussion with @larbish on Discord.
💭 Context
In a project like nuxt-ui-pro/landing, we define content schemas using zod, like this : https://github.com/nuxt-ui-pro/landing/blob/main/content.config.ts
This type of schema is great for validating content and enabling autocompletion.
However, it quickly becomes redundant with the component prop definitions themselves (UPageHero, UPageFeatures, etc.).
✨ Idea
It would be great to allow an API like:
sections: z.array(z.component('UPageFeatures'))
Where the schema is automatically generated based on the component props.
This would eliminate the need to manually maintain Zod schemas for each component.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
@farnabaz can you remove slate label ?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.