Open
Description
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.