Browse Source

refactor(nocodb): revise view update requests

pull/5269/head
Wing-Kam Wong 2 years ago
parent
commit
865ef6967b
  1. 281
      packages/nocodb/src/schema/swagger.json

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

@ -4531,7 +4531,7 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ViewReq" "$ref": "#/components/schemas/ViewUpdateReq"
}, },
"examples": { "examples": {
"Example 1": { "Example 1": {
@ -6204,55 +6204,14 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/Grid" "$ref": "#/components/schemas/GridViewUpdateReq"
}, },
"examples": { "examples": {
"Example 1": { "Example 1": {
"value": { "value": {
"project_id": "p_xm3thidrblw4n7",
"base_id": "ds_g4ccx6e77h1dmi",
"fk_view_id": "vw_p2jcatxz4mvcfw",
"row_height": 1, "row_height": 1,
"meta": null,
"columns": [
{
"id": "cl_phvuuwjrzcdo0g",
"base_id": "ds_g4ccx6e77h1dmi",
"project_id": "p_xm3thidrblw4n7",
"fk_model_id": "md_rsu68aqjsbyqtl",
"title": "Id",
"column_name": "id",
"uidt": "ID",
"dt": "int",
"np": "10",
"ns": "0",
"clen": null,
"cop": "1",
"pk": 1,
"pv": null,
"rqd": 1,
"un": 1,
"ct": "int unsigned",
"ai": 1,
"unique": 0,
"cdf": null,
"cc": "",
"csn": null,
"dtx": "specificType",
"dtxp": "",
"dtxs": "0",
"au": 0,
"validate": null,
"virtual": null,
"deleted": null,
"system": 0,
"order": 1,
"created_at": "2023-03-02 17:04:06",
"updated_at": "2023-03-02 17:04:06",
"meta": null "meta": null
} }
]
}
} }
} }
} }
@ -6512,14 +6471,13 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/GalleryReq" "$ref": "#/components/schemas/GalleryViewUpdateReq"
}, },
"examples": { "examples": {
"Example 1": { "Example 1": {
"value": { "value": {
"fk_cover_image_col_id": "cl_g0a89q9xdry3lu", "fk_cover_image_col_id": "cl_ib8l4j1kiu1efx",
"lock_type": "collaborative", "meta": null
"title": "My Gallery"
} }
} }
} }
@ -6689,7 +6647,51 @@
"examples": { "examples": {
"Example 1": { "Example 1": {
"value": { "value": {
"fk_grp_col_id": "cl_g0a89q9xdry3lu" "fk_grp_col_id": "cl_g0a89q9xdry3lu",
"fk_cover_image_col_id": "cl_ib8l4j1kiu1efx",
"meta": {
"cl_g0a89q9xdry3lu": [
{
"id": "uncategorized",
"title": null,
"order": 0,
"color": "#c2f5e8",
"collapsed": false
},
{
"id": "sl_ihyva6jx6dg0fc",
"fk_column_id": "cl_g0a89q9xdry3lu",
"title": "a",
"color": "#cfdffe",
"order": 1,
"collapsed": false
},
{
"id": "sl_gqdm5v6t8aetoa",
"fk_column_id": "cl_g0a89q9xdry3lu",
"title": "b",
"color": "#d0f1fd",
"order": 2,
"collapsed": false
},
{
"id": "sl_eipnl0kn7a9d3c",
"fk_column_id": "cl_g0a89q9xdry3lu",
"title": "cc",
"color": "#c2f5e8",
"order": 3,
"collapsed": false
},
{
"id": "sl_dei8p2jq0cnlv0",
"fk_column_id": "cl_g0a89q9xdry3lu",
"title": "d",
"color": "#ffdaf6",
"order": 4,
"collapsed": false
}
]
}
} }
} }
} }
@ -6855,30 +6857,13 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/Map" "$ref": "#/components/schemas/MapViewUpdateReq"
}, },
"examples": { "examples": {
"Example 1": { "Example 1": {
"value": { "value": {
"base_id": "ds_g4ccx6e77h1dmi",
"columns": [
{
"base_id": "ds_g4ccx6e77h1dmi",
"fk_column_id": "cl_8iw2o4ejzvdyna",
"fk_view_id": "vw_qjt7klod1p9kyv",
"id": "nc_46xcacqn4rc9xf",
"order": 1,
"project_id": "p_xm3thidrblw4n7",
"show": 1
}
],
"fk_geo_data_col_id": "cl_8iw2o4ejzvdyna", "fk_geo_data_col_id": "cl_8iw2o4ejzvdyna",
"fk_view_id": "vw_qjt7klod1p9kyv", "meta": null
"meta": {},
"order": 0,
"project_id": "p_xm3thidrblw4n7",
"show": true,
"title": "My Map"
} }
} }
} }
@ -7822,7 +7807,8 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"type": "object" "type": "array",
"items": {}
}, },
"examples": { "examples": {
"Example 1": { "Example 1": {
@ -7987,7 +7973,8 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"type": "object" "type": "array",
"items": {}
}, },
"examples": { "examples": {
"Example 1": { "Example 1": {
@ -10502,7 +10489,8 @@
}, },
"examples": { "examples": {
"Example 1": { "Example 1": {
"value": [ "value": {
"list": [
{ {
"Id": 1, "Id": 1,
"Title": "foo", "Title": "foo",
@ -10521,7 +10509,15 @@
"CreatedAt": "2023-03-11T08:48:25.598Z", "CreatedAt": "2023-03-11T08:48:25.598Z",
"UpdatedAt": "2023-03-11T08:48:25.598Z" "UpdatedAt": "2023-03-11T08:48:25.598Z"
} }
] ],
"pageInfo": {
"isFirstPage": true,
"isLastPage": true,
"pageSize": 1,
"sort": "string",
"totalRows": 3
}
}
} }
} }
} }
@ -14676,6 +14672,33 @@
}, },
"required": ["title"] "required": ["title"]
}, },
"GalleryViewUpdateReq": {
"description": "Model for Gallery View Update Request",
"x-stoplight": {
"id": "mgch3vcokvxml"
},
"examples": [
{
"fk_cover_image_col_id": "cl_ib8l4j1kiu1efx",
"meta": null
}
],
"title": "Gallery View Update Request Model",
"type": "object",
"properties": {
"fk_cover_image_col_id": {
"$ref": "#/components/schemas/StringOrNull",
"description": "The id of the column that contains the cover image"
},
"meta": {
"$ref": "#/components/schemas/Meta",
"x-stoplight": {
"id": "zhp6jkrr54wuf"
},
"description": "Meta Info"
}
}
},
"GeoLocation": { "GeoLocation": {
"description": "Model for Geo Location", "description": "Model for Geo Location",
"examples": [ "examples": [
@ -14928,6 +14951,37 @@
"title": "Grid Column Request Model", "title": "Grid Column Request Model",
"type": "object" "type": "object"
}, },
"GridViewUpdateReq": {
"description": "Model for Grid View Update",
"x-stoplight": {
"id": "d7x12vwf1fgz4"
},
"examples": [
{
"row_height": "1",
"meta": null
}
],
"title": "Grid View Update Model",
"type": "object",
"properties": {
"row_height": {
"type": "number",
"x-stoplight": {
"id": "m5976ax1q13cr"
},
"description": "Row Height",
"example": 1
},
"meta": {
"$ref": "#/components/schemas/Meta",
"x-stoplight": {
"id": "dugbkhe9iupqu"
},
"description": "Meta Info for grid view"
}
}
},
"GridReq": { "GridReq": {
"description": "Model for Grid Request", "description": "Model for Grid Request",
"examples": [ "examples": [
@ -15532,7 +15586,51 @@
"description": "Model for Kanban Update Request", "description": "Model for Kanban Update Request",
"examples": [ "examples": [
{ {
"fk_grp_col_id": "cl_g0a89q9xdry3lu" "fk_grp_col_id": "cl_g0a89q9xdry3lu",
"fk_cover_image_col_id": "cl_ib8l4j1kiu1efx",
"meta": {
"cl_g0a89q9xdry3lu": [
{
"id": "uncategorized",
"title": null,
"order": 0,
"color": "#c2f5e8",
"collapsed": false
},
{
"id": "sl_ihyva6jx6dg0fc",
"fk_column_id": "cl_g0a89q9xdry3lu",
"title": "a",
"color": "#cfdffe",
"order": 1,
"collapsed": false
},
{
"id": "sl_gqdm5v6t8aetoa",
"fk_column_id": "cl_g0a89q9xdry3lu",
"title": "b",
"color": "#d0f1fd",
"order": 2,
"collapsed": false
},
{
"id": "sl_eipnl0kn7a9d3c",
"fk_column_id": "cl_g0a89q9xdry3lu",
"title": "cc",
"color": "#c2f5e8",
"order": 3,
"collapsed": false
},
{
"id": "sl_dei8p2jq0cnlv0",
"fk_column_id": "cl_g0a89q9xdry3lu",
"title": "d",
"color": "#ffdaf6",
"order": 4,
"collapsed": false
}
]
}
} }
], ],
"title": "Kanban Update Request Model", "title": "Kanban Update Request Model",
@ -15541,6 +15639,20 @@
"fk_grp_col_id": { "fk_grp_col_id": {
"$ref": "#/components/schemas/StringOrNull", "$ref": "#/components/schemas/StringOrNull",
"description": "Foreign Key to Grouping Field Column" "description": "Foreign Key to Grouping Field Column"
},
"fk_cover_image_col_id": {
"$ref": "#/components/schemas/StringOrNull",
"x-stoplight": {
"id": "81wn4hzj76wod"
},
"description": "Foreign Key to Cover Image Column"
},
"meta": {
"$ref": "#/components/schemas/Meta",
"x-stoplight": {
"id": "stsvdmkli1b0r"
},
"description": "Meta Info"
} }
} }
}, },
@ -15827,6 +15939,31 @@
"title": "Map Model", "title": "Map Model",
"type": "object" "type": "object"
}, },
"MapViewUpdateReq": {
"description": "Model for Map",
"x-stoplight": {
"id": "o1v53xl8b6hn9"
},
"examples": [
{
"fk_geo_data_col_id": "cl_8iw2o4ejzvdyna",
"meta": null
}
],
"title": "Map View Update Request Model",
"type": "object",
"properties": {
"fk_geo_data_col_id": {
"description": "Foreign Key to GeoData Column",
"example": "cl_8iw2o4ejzvdyna",
"type": "string"
},
"meta": {
"$ref": "#/components/schemas/Meta",
"description": "Meta data for this view"
}
}
},
"MapColumn": { "MapColumn": {
"description": "Model for Map Column", "description": "Model for Map Column",
"examples": [ "examples": [

Loading…
Cancel
Save