vue-typescript-schema
v0.1.2
Published
Generate JSON schema from Vue SFC with type annotations
Readme
vue-typescript-schema
Generate JSON schema from Vue SFC with type annotations.
This is useful for AI to generate or validate component props via tool calls. It uses @vue/language-core under the hood.
Usage
import { getJSONSchemaFromExportedVueSFC } from 'vue-typescript-schema'
const schemas = await getJSONSchemaFromExportedVueSFC('./src/index.ts', {
meta: import.meta,
tsconfig: './tsconfig.json',
}) // { $schema: "https://json-schema.org/draft/07/schema#", definitions: { ... } }