@lyonbot/json-schema-designer
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

json-schema-designer

Online Demo: http://lyonbot.github.io/json-schema-designer/

A JSON Schema Designer Written in Vue.

Usage

npm install @lyonbot/json-schema-designer

import JsonSchemaDesigner from "@lyonbot/json-schema-designer";

// in your Vue component
export default {
  components: {
    JsonSchemaDesigner
  },
  data() {
    return {
      schema: {
        type: "object",
        properties: {
          name: { type: "string", title: "名字" },
          age: { type: "integer", title: "年龄", minimum: 0 },
          tags: { type: "array", items: { type: "string" } }
        },
        required: ["name", "age", "tags"]
      }
    }
  }
}
<json-schema-designer :value.sync="schema" />

Note: a customized example can be found in src/example/index.ts and src/example/App.vue

https://github.com/lyonbot/json-schema-designer

Readme

Keywords

none

Package Sidebar

Install

npm i @lyonbot/json-schema-designer

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

93.6 kB

Total Files

8

Last publish

Collaborators

  • lyonbot