Browse Source

refactor(nocodb): mark list & pageInfo required and add example to project list

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

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

@ -1331,8 +1331,60 @@
"summary": "List Projects", "summary": "List Projects",
"operationId": "project-list", "operationId": "project-list",
"responses": { "responses": {
"201": { "200": {
"$ref": "#/components/responses/ProjectList" "description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectList"
},
"examples": {
"Example 1": {
"value": {
"list": [
{
"bases": [
{
"alias": "string",
"config": null,
"created_at": "2023-03-01 14:27:36",
"enabled": true,
"id": "string",
"inflection_column": "camelize",
"inflection_table": "camelize",
"is_meta": true,
"order": 1,
"project_id": "string",
"type": "mysql2",
"updated_at": "2023-03-01 14:27:36"
}
],
"color": "#24716E",
"created_at": "2023-03-01 14:27:36",
"deleted": true,
"description": "This is my project description",
"id": "p_124hhlkbeasewh",
"is_meta": true,
"meta": {},
"order": 0,
"prefix": "nc_vm5q__",
"status": "string",
"title": "my-project",
"updated_at": "2023-03-01 14:27:36"
}
],
"pageInfo": {
"isFirstPage": true,
"isLastPage": true,
"page": 1,
"pageSize": 10,
"totalRows": 1
}
}
}
}
}
}
} }
}, },
"description": "List all project meta data", "description": "List all project meta data",
@ -9582,7 +9634,8 @@
"id": "xqwcniocq37hk" "id": "xqwcniocq37hk"
} }
} }
} },
"required": ["list", "pageInfo"]
}, },
"BaseReq": { "BaseReq": {
"description": "Model for Base Request", "description": "Model for Base Request",
@ -10042,7 +10095,8 @@
"id": "ko0s0z13h4hsw" "id": "ko0s0z13h4hsw"
} }
} }
} },
"required": ["list", "pageInfo"]
}, },
"ColumnReq": { "ColumnReq": {
"allOf": [ "allOf": [
@ -10401,7 +10455,8 @@
"id": "7cyrb1770mrzz" "id": "7cyrb1770mrzz"
} }
} }
} },
"required": ["list", "pageInfo"]
}, },
"FilterReq": { "FilterReq": {
"description": "Model for Filter Request", "description": "Model for Filter Request",
@ -11678,7 +11733,8 @@
"pageInfo": { "pageInfo": {
"$ref": "#/components/schemas/Paginated" "$ref": "#/components/schemas/Paginated"
} }
} },
"required": ["list", "pageInfo"]
}, },
"HookLog": { "HookLog": {
"description": "Model for Hook Log", "description": "Model for Hook Log",
@ -12983,21 +13039,6 @@
} }
} }
], ],
"properties": {
"list": {
"description": "List of Project Models",
"items": {
"$ref": "#/components/schemas/Project"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"pageInfo": {
"$ref": "#/components/schemas/Paginated",
"description": "Pagination Info"
}
},
"title": "Project List Model", "title": "Project List Model",
"type": "object", "type": "object",
"x-examples": { "x-examples": {
@ -13028,8 +13069,24 @@
} }
} }
} }
},
"properties": {
"list": {
"description": "List of Project Models",
"minItems": 1,
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/components/schemas/Project"
}
},
"pageInfo": {
"$ref": "#/components/schemas/Paginated",
"description": "Pagination Info"
} }
}, },
"required": ["list", "pageInfo"]
},
"ProjectReq": { "ProjectReq": {
"description": "Model for Project Request", "description": "Model for Project Request",
"examples": [ "examples": [
@ -13375,19 +13432,6 @@
} }
} }
], ],
"properties": {
"list": {
"items": {
"$ref": "#/components/schemas/SharedView"
},
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"pageInfo": {
"$ref": "#/components/schemas/Paginated"
}
},
"title": "Shared View List Model", "title": "Shared View List Model",
"type": "object", "type": "object",
"x-examples": { "x-examples": {
@ -13418,8 +13462,22 @@
} }
} }
} }
},
"properties": {
"list": {
"minItems": 1,
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/components/schemas/SharedView"
} }
}, },
"pageInfo": {
"$ref": "#/components/schemas/Paginated"
}
},
"required": ["list", "pageInfo"]
},
"SharedViewReq": { "SharedViewReq": {
"description": "Model for Shared View Request", "description": "Model for Shared View Request",
"examples": [ "examples": [
@ -13644,7 +13702,8 @@
"id": "i75wcejfp5mnq" "id": "i75wcejfp5mnq"
} }
} }
} },
"required": ["list", "pageInfo"]
}, },
"SortReq": { "SortReq": {
"description": "Model for Sort Request", "description": "Model for Sort Request",
@ -14231,7 +14290,8 @@
"pageInfo": { "pageInfo": {
"$ref": "#/components/schemas/Paginated" "$ref": "#/components/schemas/Paginated"
} }
} },
"required": ["list", "pageInfo"]
}, },
"TableReq": { "TableReq": {
"description": "Model for Table Request", "description": "Model for Table Request",
@ -14534,7 +14594,8 @@
"id": "0d98n6sfxfvft" "id": "0d98n6sfxfvft"
} }
} }
} },
"required": ["list", "pageInfo"]
}, },
"View": { "View": {
"description": "Model for View", "description": "Model for View",
@ -14726,17 +14787,6 @@
} }
} }
], ],
"properties": {
"list": {
"items": {
"$ref": "#/components/schemas/View"
},
"type": "array"
},
"pageInfo": {
"$ref": "#/components/schemas/Paginated"
}
},
"title": "View List Model", "title": "View List Model",
"type": "object", "type": "object",
"x-examples": { "x-examples": {
@ -14767,8 +14817,20 @@
} }
} }
} }
},
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/components/schemas/View"
} }
}, },
"pageInfo": {
"$ref": "#/components/schemas/Paginated"
}
},
"required": ["list", "pageInfo"]
},
"ViewReq": { "ViewReq": {
"description": "Model for View Request", "description": "Model for View Request",
"examples": [ "examples": [

Loading…
Cancel
Save