Browse Source

refactor(nocodb): revise SharedView model & SelectOption example in swagger.json

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

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

@ -11387,34 +11387,40 @@
"description": "Model for SelectOption", "description": "Model for SelectOption",
"examples": [ "examples": [
{ {
"color": "string", "id": "sl_hvfeuagqtlzzbk",
"fk_column_id": "string", "title": "Option A",
"id": "string", "fk_column_id": "cl_35zmvi2tezfipw",
"order": 1, "color": "#cfdffe",
"title": "string" "order": 1
} }
], ],
"title": "SelectOption Model",
"type": "object",
"properties": { "properties": {
"color": { "id": {
"type": "string" "$ref": "#/components/schemas/Id",
"description": "Unique ID"
},
"title": {
"type": "string",
"description": "Option Title\n",
"example": "Option A"
}, },
"fk_column_id": { "fk_column_id": {
"$ref": "#/components/schemas/Id", "$ref": "#/components/schemas/Id",
"description": "Foreign Key to Column" "description": "Foreign Key to Column"
}, },
"id": { "color": {
"$ref": "#/components/schemas/Id", "type": "string",
"description": "Unique ID" "description": "Option Color",
"example": "#cfdffe"
}, },
"order": { "order": {
"type": "number" "type": "number",
}, "description": "The order among the options",
"title": { "example": 1
"type": "string"
} }
}, }
"title": "SelectOption Model",
"type": "object"
}, },
"SelectOptions": { "SelectOptions": {
"description": "Model for SelectOptions", "description": "Model for SelectOptions",
@ -11422,75 +11428,87 @@
{ {
"options": [ "options": [
{ {
"color": "string", "id": "sl_hvfeuagqtlzzbk",
"fk_column_id": "string", "title": "Option A",
"id": "string", "fk_column_id": "cl_35zmvi2tezfipw",
"order": 1, "color": "#cfdffe",
"title": "string" "order": 1
} }
] ]
} }
], ],
"title": "SelectOptions Model",
"type": "object",
"properties": { "properties": {
"options": { "options": {
"type": "array",
"description": "Array of select options",
"items": { "items": {
"$ref": "#/components/schemas/SelectOption" "$ref": "#/components/schemas/SelectOption"
}, }
"type": "array"
} }
}, },
"required": ["options"], "required": ["options"]
"title": "SelectOptions Model",
"type": "object"
}, },
"SharedBaseReq": { "SharedBaseReq": {
"description": "Model for Shared Base Request", "description": "Model for Shared Base Request",
"examples": [ "examples": [
{ {
"password": "stringst", "password": "password123",
"roles": "editor" "roles": "editor"
} }
], ],
"title": "Shared Base Request Model",
"type": "object",
"properties": { "properties": {
"password": { "password": {
"minLength": 8, "minLength": 8,
"type": "string" "type": "string",
"description": "Password to protect the base",
"example": "password123"
}, },
"roles": { "roles": {
"enum": ["commenter", "editor", "viewer"], "enum": ["commenter", "editor", "viewer"],
"type": "string" "type": "string",
"description": "The role given the target user",
"example": "editor"
} }
}, }
"title": "Shared Base Request Model",
"type": "object"
}, },
"SharedView": { "SharedView": {
"$ref": "#/components/schemas/View",
"description": "Model for Shared View", "description": "Model for Shared View",
"title": "SharedView",
"examples": [ "examples": [
{ {
"deleted": "string", "base_id": "ds_g4ccx6e77h1dmi",
"fk_view_id": "string", "created_at": "2023-03-02 17:46:31",
"id": "string", "fk_model_id": "md_mhs9z4r2ak98x0",
"password": "string" "id": "vw_lg052cnc1c26kf",
} "is_default": 1,
], "lock_type": "collaborative",
"properties": { "meta": {},
"deleted": { "order": 1,
"type": "string" "password": null,
}, "project_id": "p_xm3thidrblw4n7",
"fk_view_id": { "show": 1,
"type": "string" "show_system_fields": null,
}, "title": "Sheet-1",
"id": { "type": 3,
"$ref": "#/components/schemas/Id", "updated_at": "2023-03-02 17:46:31",
"description": "Unique ID" "uuid": null,
}, "view": {
"password": { "base_id": "ds_g4ccx6e77h1dmi",
"type": "string" "created_at": "2023-03-02 17:46:31",
"fk_view_id": "vw_lg052cnc1c26kf",
"meta": null,
"project_id": "p_xm3thidrblw4n7",
"row_height": null,
"updated_at": "2023-03-02 17:46:31",
"uuid": null
}
} }
}, ]
"title": "Shared View Model",
"type": "object"
}, },
"SharedViewList": { "SharedViewList": {
"description": "Model for Shared View List", "description": "Model for Shared View List",

Loading…
Cancel
Save