Skip to content

Commit 3e54f2a

Browse files
authored
Fix json schemas to allow string ids (#447)
1 parent f261313 commit 3e54f2a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/data/schemas.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const tableSchema = {
22
type: "object",
33
properties: {
4-
id: { type: "integer" },
4+
id: { type: ["integer", "string"] },
55
name: { type: "string" },
66
x: { type: "number" },
77
y: { type: "number" },
@@ -10,6 +10,7 @@ export const tableSchema = {
1010
items: {
1111
type: "object",
1212
properties: {
13+
id: { type: ["integer", "string"] },
1314
name: { type: "string" },
1415
type: { type: "string" },
1516
default: { type: "string" },
@@ -23,6 +24,7 @@ export const tableSchema = {
2324
values: { type: "array", items: { type: "string" } },
2425
},
2526
required: [
27+
"id",
2628
"name",
2729
"type",
2830
"default",
@@ -131,10 +133,10 @@ export const jsonSchema = {
131133
items: {
132134
type: "object",
133135
properties: {
134-
startTableId: { type: "integer" },
135-
startFieldId: { type: "integer" },
136-
endTableId: { type: "integer" },
137-
endFieldId: { type: "integer" },
136+
startTableId: { type: ["integer", "string"] },
137+
startFieldId: { type: ["integer", "string"] },
138+
endTableId: { type: ["integer", "string"] },
139+
endFieldId: { type: ["integer", "string"] },
138140
name: { type: "string" },
139141
cardinality: { type: "string" },
140142
updateConstraint: { type: "string" },

0 commit comments

Comments
 (0)