Browse Source

refactor(nocodb): column examples in swagger.json

pull/5222/head
Wing-Kam Wong 2 years ago
parent
commit
029c71f1cc
  1. 292
      packages/nocodb/src/schema/swagger.json

292
packages/nocodb/src/schema/swagger.json

@ -9140,25 +9140,74 @@
"Column": { "Column": {
"title": "Column Model", "title": "Column Model",
"type": "object", "type": "object",
"description": "Model for Column",
"examples": [
{
"id": "cl_0j9gv0oi8vjy46",
"base_id": "ds_krsappzu9f8vmo",
"project_id": "p_01clqvzik3izk6",
"fk_model_id": "md_yvwvbt2i78rgcm",
"title": "Title",
"column_name": "title",
"uidt": "SingleLineText",
"dt": "varchar",
"np": null,
"ns": null,
"clen": "45",
"cop": "2",
"pk": 0,
"pv": 1,
"rqd": 0,
"un": 0,
"ct": "varchar(45)",
"ai": 0,
"unique": 0,
"cdf": null,
"cc": "",
"csn": "utf8mb4",
"dtx": "specificType",
"dtxp": "45",
"dtxs": null,
"au": 0,
"validate": null,
"virtual": null,
"deleted": null,
"system": 0,
"order": 2,
"created_at": "2023-03-02 13:14:16",
"updated_at": "2023-03-02 13:14:16",
"meta": null
}
],
"properties": { "properties": {
"id": { "id": {
"$ref": "#/components/schemas/Id", "$ref": "#/components/schemas/Id",
"description": "Unique ID" "description": "Unique ID"
}, },
"base_id": { "base_id": {
"type": "string" "type": "string",
"description": "Base ID that this column belongs to",
"example": "ds_krsappzu9f8vmo"
}, },
"fk_model_id": { "fk_model_id": {
"type": "string" "type": "string",
"description": "Model ID that this column belongs to",
"example": "md_yvwvbt2i78rgcm"
}, },
"title": { "title": {
"type": "string" "type": "string",
"description": "Column Title",
"example": "Title"
}, },
"uidt": { "uidt": {
"type": "string" "type": "string",
"description": "The data type in UI",
"example": "SingleLineText"
}, },
"dt": { "dt": {
"type": "string" "type": "string",
"description": "Data Type in DB",
"example": "varchar"
}, },
"np": { "np": {
"oneOf": [ "oneOf": [
@ -9171,7 +9220,8 @@
{ {
"type": "null" "type": "null"
} }
] ],
"description": "Numeric Precision"
}, },
"ns": { "ns": {
"oneOf": [ "oneOf": [
@ -9184,7 +9234,8 @@
{ {
"type": "null" "type": "null"
} }
] ],
"description": "Numeric Scale"
}, },
"clen": { "clen": {
"oneOf": [ "oneOf": [
@ -9197,46 +9248,64 @@
{ {
"type": "null" "type": "null"
} }
] ],
"description": "Character Maximum Length"
}, },
"cop": { "cop": {
"type": "string" "type": "string",
"description": "Column Ordinal Position"
}, },
"pk": { "pk": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is Primary Key?"
}, },
"pv": { "pv": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is Primary Value?"
}, },
"rqd": { "rqd": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is Required?"
}, },
"column_name": { "column_name": {
"type": "string" "type": "string",
"description": "Column Name",
"example": "title"
}, },
"un": { "un": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is Unsigned?"
}, },
"ct": { "ct": {
"type": "string" "type": "string",
"description": "Column Type",
"example": "varchar(45)"
}, },
"ai": { "ai": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is Auto-Increment?"
}, },
"unique": { "unique": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is unique?"
}, },
"cdf": { "cdf": {
"type": "string" "type": "string",
"description": "Column Default"
}, },
"cc": { "cc": {
"type": "string" "type": "string",
"description": "Column Comment"
}, },
"csn": { "csn": {
"type": "string" "type": "string",
"description": "Character Set Name",
"example": "utf8mb4"
}, },
"dtx": { "dtx": {
"type": "string" "type": "string",
"description": "Data Type X",
"example": "specificType"
}, },
"dtxp": { "dtxp": {
"oneOf": [ "oneOf": [
@ -9249,7 +9318,8 @@
{ {
"type": "null" "type": "null"
} }
] ],
"description": "Data Type X Precision"
}, },
"dtxs": { "dtxs": {
"oneOf": [ "oneOf": [
@ -9262,25 +9332,32 @@
{ {
"type": "null" "type": "null"
} }
] ],
"description": "Data Type X Scale"
}, },
"au": { "au": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Auto Update Timestamp"
}, },
"deleted": { "deleted": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is Deleted?"
}, },
"visible": { "visible": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is Visible?"
}, },
"order": { "order": {
"type": "number" "type": "number",
"description": "The order of the list of columns"
}, },
"system": { "system": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Is System Colun?"
}, },
"meta": { "meta": {
"$ref": "#/components/schemas/Meta" "$ref": "#/components/schemas/Meta",
"description": "Meta Info"
}, },
"colOptions": { "colOptions": {
"anyOf": [ "anyOf": [
@ -9302,61 +9379,10 @@
{ {
"type": "object" "type": "object"
} }
] ],
} "description": "Column Options"
},
"description": "Model for Column",
"examples": [
{
"id": "string",
"base_id": "string",
"fk_model_id": "string",
"title": "string",
"uidt": "string",
"dt": "string",
"np": "string",
"ns": "string",
"clen": "string",
"cop": "string",
"pk": true,
"pv": true,
"rqd": true,
"column_name": "string",
"un": true,
"ct": "string",
"ai": true,
"unique": true,
"cdf": "string",
"cc": "string",
"csn": "string",
"dtx": "string",
"dtxp": "string",
"dtxs": "string",
"au": true,
"deleted": true,
"visible": true,
"order": 0,
"system": true,
"meta": {},
"colOptions": {
"id": "string",
"type": "string",
"virtual": true,
"fk_column_id": "string",
"fk_child_column_id": "string",
"fk_parent_column_id": "string",
"fk_mm_model_id": "string",
"fk_related_model_id": "string",
"fk_mm_child_column_id": "string",
"fk_mm_parent_column_id": "string",
"ur": "string",
"dr": "string",
"fk_index_name": "string",
"deleted": "string",
"order": "string"
}
} }
] }
}, },
"ColumnList": { "ColumnList": {
"description": "Model for Column List", "description": "Model for Column List",
@ -9413,52 +9439,64 @@
"columns": { "columns": {
"list": [ "list": [
{ {
"id": "string", "id": "cl_vnrvdzwnk6uuov",
"base_id": "string", "base_id": "ds_krsappzu9f8vmo",
"fk_model_id": "string", "project_id": "p_01clqvzik3izk6",
"title": "string", "fk_model_id": "md_yvwvbt2i78rgcm",
"uidt": "string", "title": "SingleSelect",
"dt": "string", "column_name": "SingleSelect",
"np": "string", "uidt": "SingleSelect",
"ns": "string", "dt": "enum",
"clen": "string", "np": null,
"cop": "string", "ns": null,
"pk": true, "clen": "1",
"pv": true, "cop": "5",
"rqd": true, "pk": 0,
"column_name": "string", "pv": null,
"un": true, "rqd": 0,
"ct": "string", "un": 0,
"ai": true, "ct": "enum('a','b','c')",
"unique": true, "ai": 0,
"cdf": "string", "unique": 0,
"cc": "string", "cdf": null,
"csn": "string", "cc": "",
"dtx": "string", "csn": "utf8mb4",
"dtxp": "string", "dtx": "specificType",
"dtxs": "string", "dtxp": "'a','b','c'",
"au": true, "dtxs": null,
"deleted": true, "au": 0,
"visible": true, "validate": null,
"order": 0, "virtual": null,
"system": true, "deleted": null,
"system": 0,
"order": null,
"created_at": "2023-03-03 11:32:59",
"updated_at": "2023-03-03 11:32:59",
"meta": {}, "meta": {},
"colOptions": { "colOptions": {
"id": "string", "options": [
"type": "string", {
"virtual": true, "id": "sl_mb8fkdvgudzu3r",
"fk_column_id": "string", "fk_column_id": "cl_vnrvdzwnk6uuov",
"fk_child_column_id": "string", "title": "a",
"fk_parent_column_id": "string", "color": "#cfdffe",
"fk_mm_model_id": "string", "order": 1
"fk_related_model_id": "string", },
"fk_mm_child_column_id": "string", {
"fk_mm_parent_column_id": "string", "id": "sl_31uj9j02qacl7c",
"ur": "string", "fk_column_id": "cl_vnrvdzwnk6uuov",
"dr": "string", "title": "b",
"fk_index_name": "string", "color": "#d0f1fd",
"deleted": "string", "order": 2
"order": "string" },
{
"id": "sl_uabhxfapw4frlg",
"fk_column_id": "cl_vnrvdzwnk6uuov",
"title": "c",
"color": "#c2f5e8",
"order": 3
}
]
} }
} }
] ]

Loading…
Cancel
Save