mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-02-11 02:00:37 +08:00
Export and import enums in diagrams
This commit is contained in:
@@ -108,6 +108,17 @@ export const typeSchema = {
|
||||
required: ["name", "fields", "comment"],
|
||||
};
|
||||
|
||||
export const enumSchema = {
|
||||
type: "object",
|
||||
properties: {
|
||||
name: { type: "string" },
|
||||
values: {
|
||||
type: "array",
|
||||
items: { type: "string" },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const jsonSchema = {
|
||||
type: "object",
|
||||
properties: {
|
||||
@@ -151,6 +162,14 @@ export const jsonSchema = {
|
||||
type: "array",
|
||||
items: { ...areaSchema },
|
||||
},
|
||||
types: {
|
||||
type: "array",
|
||||
items: { ...typeSchema },
|
||||
},
|
||||
enums: {
|
||||
type: "array",
|
||||
items: { ...enumSchema },
|
||||
},
|
||||
title: { type: "string" },
|
||||
},
|
||||
required: ["tables", "relationships", "notes", "subjectAreas"],
|
||||
|
||||
Reference in New Issue
Block a user