From 10b7dc328361ecb45764c3b21cb44f2f36a22dd6 Mon Sep 17 00:00:00 2001 From: Yusuf Ismail Date: Sun, 18 May 2025 01:54:25 -0500 Subject: [PATCH] Update table schema When exporting a diagram that contains a table with indices to JSON then importing it, an validation error occurs because the schema for the index on the table was not correctly setup leading to the file being considered an invalid json. --- src/data/schemas.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/data/schemas.js b/src/data/schemas.js index db17815f..9839aa84 100644 --- a/src/data/schemas.js +++ b/src/data/schemas.js @@ -47,7 +47,12 @@ export const tableSchema = { unique: { type: "boolean" }, fields: { type: "array", - items: { type: "string" }, + items: { + type: "object", properties: { + type: { type: "string" }, + value: { type: "string" } + } + }, }, }, required: ["name", "unique", "fields"],