From 0e2ffc84aa3ec841bb5914e93b5472b0a4fae1da Mon Sep 17 00:00:00 2001 From: 1ilit <1ilit@proton.me> Date: Mon, 12 May 2025 19:31:27 +0400 Subject: [PATCH] Fix json schemas to allow string ids --- src/data/schemas.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/data/schemas.js b/src/data/schemas.js index 057749f..db17815 100644 --- a/src/data/schemas.js +++ b/src/data/schemas.js @@ -1,7 +1,7 @@ export const tableSchema = { type: "object", properties: { - id: { type: "integer" }, + id: { type: ["integer", "string"] }, name: { type: "string" }, x: { type: "number" }, y: { type: "number" }, @@ -10,6 +10,7 @@ export const tableSchema = { items: { type: "object", properties: { + id: { type: ["integer", "string"] }, name: { type: "string" }, type: { type: "string" }, default: { type: "string" }, @@ -23,6 +24,7 @@ export const tableSchema = { values: { type: "array", items: { type: "string" } }, }, required: [ + "id", "name", "type", "default", @@ -131,10 +133,10 @@ export const jsonSchema = { items: { type: "object", properties: { - startTableId: { type: "integer" }, - startFieldId: { type: "integer" }, - endTableId: { type: "integer" }, - endFieldId: { type: "integer" }, + startTableId: { type: ["integer", "string"] }, + startFieldId: { type: ["integer", "string"] }, + endTableId: { type: ["integer", "string"] }, + endFieldId: { type: ["integer", "string"] }, name: { type: "string" }, cardinality: { type: "string" }, updateConstraint: { type: "string" },