1
0
Fork 0
mirror of synced 2024-09-11 15:08:05 +12:00
budibase/packages/server/specs/schemas.js

39 lines
785 B
JavaScript
Raw Normal View History

2022-02-19 07:06:58 +13:00
const { FieldTypes } = require("../src/constants")
exports.row = {
description: "The row to be created/updated, based on the table schema.",
type: "object",
additionalProperties: {
oneOf: [
{ type: "string" },
{ type: "object" },
{ type: "integer" },
{ type: "array" },
{ type: "boolean" },
],
},
}
2022-02-19 07:06:58 +13:00
exports.table = {
description: "The table to be created/updated.",
type: "object",
properties: {
name: {
description: "The name of the table",
type: "string",
},
schema: {
type: "object",
additionalProperties: {
type: "object",
properties: {
type: {
type: "string",
enum: Object.values(FieldTypes),
},
},
},
},
},
}