JSON Schema based form generator built with vue 3
yarn add j2u # npm i j2u
<JsonSchema :schema="schema" v-model="value"/>
schema = {
type: 'object',
properties: {
aaa: { type: 'string', minLength: 1 },
bbb: { type: 'boolean' },
ccc: { type: 'string', enum: ['1', '2', '3'] },
ddd: {
type: 'object',
title: '',
properties: {
a1: { type: 'string', minLength: 1, maxLength: 5 },
b2: { type: 'boolean', default: true },
ddd: {
type: 'object',
properties: {
a1: { type: 'string', default: 'aaa' },
b2: { type: 'boolean' }
}
}
}
}
}
}
- inspired by vue-jsonschema-form and ncform