Browse Source

refactor(nocodb): sort model in swagger.json

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

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

@ -11634,22 +11634,21 @@
"description": "Model for Sort", "description": "Model for Sort",
"examples": [ "examples": [
{ {
"base_id": "string", "id": "so_xd4t51uv60ghzl",
"direction": "string", "fk_column_id": "cl_l11b769pe2j1ce",
"fk_column_id": "string", "fk_model_id": "md_ehn5izr99m7d45",
"fk_model_id": "string", "base_id": "ds_3l9qx8xqksenrl",
"id": "string", "direction": "desc",
"order": 0, "order": 1,
"project_id": "string" "project_id": "p_9sx43moxhqtjm3"
} }
], ],
"title": "Sort Model",
"type": "object",
"properties": { "properties": {
"base_id": { "id": {
"readOnly": true, "$ref": "#/components/schemas/Id",
"type": "string" "description": "Unique ID"
},
"direction": {
"type": "string"
}, },
"fk_column_id": { "fk_column_id": {
"$ref": "#/components/schemas/Id" "$ref": "#/components/schemas/Id"
@ -11657,20 +11656,29 @@
"fk_model_id": { "fk_model_id": {
"$ref": "#/components/schemas/Id" "$ref": "#/components/schemas/Id"
}, },
"id": { "base_id": {
"$ref": "#/components/schemas/Id", "type": "string",
"description": "Unique ID" "description": "Base ID",
"example": "ds_3l9qx8xqksenrl",
"readOnly": true
},
"direction": {
"type": "string",
"description": "Sort direction",
"enum": ["asc", "desc"],
"example": "desc"
}, },
"order": { "order": {
"type": "number" "type": "number",
"example": 1
}, },
"project_id": { "project_id": {
"readOnly": true, "type": "string",
"type": "string" "description": "Project ID",
"example": "p_9sx43moxhqtjm3",
"readOnly": true
} }
}, }
"title": "Sort Model",
"type": "object"
}, },
"SortList": { "SortList": {
"description": "Model for Sort List", "description": "Model for Sort List",
@ -11679,32 +11687,18 @@
"sorts": { "sorts": {
"list": [ "list": [
{ {
"deleted": "string", "id": "so_xd4t51uv60ghzl",
"fk_view_id": "string", "fk_column_id": "cl_l11b769pe2j1ce",
"id": "string", "fk_model_id": "md_ehn5izr99m7d45",
"password": "string" "base_id": "ds_3l9qx8xqksenrl",
"direction": "desc",
"order": 1,
"project_id": "p_9sx43moxhqtjm3"
} }
] ]
} }
} }
], ],
"properties": {
"sorts": {
"properties": {
"list": {
"items": {
"$ref": "#/components/schemas/SharedView"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
}
},
"required": ["list"],
"type": "object"
}
},
"required": ["sorts"],
"title": "Sort List Model", "title": "Sort List Model",
"type": "object", "type": "object",
"x-examples": { "x-examples": {
@ -11735,30 +11729,47 @@
} }
} }
} }
} },
"properties": {
"sorts": {
"type": "object",
"required": ["list"],
"properties": {
"list": {
"minItems": 1,
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/components/schemas/Sort"
}
}
}
}
},
"required": ["sorts"]
}, },
"SortReq": { "SortReq": {
"description": "Model for Sort Request", "description": "Model for Sort Request",
"examples": [ "examples": [
{ {
"direction": "asc", "direction": "asc",
"fk_column_id": "string" "fk_column_id": "cl_l11b769pe2j1ce"
} }
], ],
"minProperties": 1, "minProperties": 1,
"title": "Sort Request Model",
"type": "object",
"properties": { "properties": {
"fk_column_id": {
"$ref": "#/components/schemas/Id",
"description": "Foreign Key to Column"
},
"direction": { "direction": {
"description": "Sort direction", "description": "Sort direction",
"enum": ["asc", "desc"], "enum": ["asc", "desc"],
"type": "string" "type": "string"
},
"fk_column_id": {
"$ref": "#/components/schemas/Id",
"description": "Foreign Key to Column"
} }
}, }
"title": "Sort Request Model",
"type": "object"
}, },
"StringOrNull": { "StringOrNull": {
"description": "Model for StringOrNull", "description": "Model for StringOrNull",

Loading…
Cancel
Save