refactor: input keyword / category

This commit is contained in:
Methapon2001 2023-12-01 10:55:36 +07:00
parent 7b894383da
commit cbc867c8e3
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
6 changed files with 514 additions and 401 deletions

View file

@ -599,6 +599,35 @@
"$ref": "#/components/schemas/StorageFile"
},
"type": "array"
},
"examples": {
"Example 1": {
"value": [
{
"pathname": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/เอกสาร 1",
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/",
"title": "เอกสาร",
"description": "เอกสารการเงิน",
"category": [
"บัญชี"
],
"keyword": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
],
"upload": false,
"fileName": "เอกสาร 1",
"fileSize": 10240,
"fileType": "application/pdf",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin",
"updatedAt": "2021-07-20T12:33:13.018Z",
"updatedBy": "admin"
}
]
}
}
}
}
@ -619,7 +648,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -627,7 +657,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -635,7 +666,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
}
]
},
@ -649,10 +681,16 @@
"schema": {
"properties": {
"keyword": {
"type": "string"
"items": {
"type": "string"
},
"type": "array"
},
"category": {
"type": "string"
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
@ -704,6 +742,33 @@
"createdAt"
],
"type": "object"
},
"examples": {
"Example 1": {
"value": {
"pathname": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/เอกสาร 1",
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/",
"title": "เอกสาร",
"description": "เอกสารการเงิน",
"category": [
"บัญชี"
],
"keyword": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
],
"upload": false,
"fileName": "เอกสาร 1",
"fileSize": 10240,
"fileType": "application/pdf",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin",
"updatedAt": "2021-07-20T12:33:13.018Z",
"updatedBy": "admin"
}
}
}
}
}
@ -729,7 +794,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -737,7 +803,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -745,7 +812,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
}
],
"requestBody": {
@ -755,19 +823,37 @@
"schema": {
"properties": {
"keyword": {
"type": "string"
"items": {
"type": "string"
},
"type": "array",
"example": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
]
},
"category": {
"type": "string"
"items": {
"type": "string"
},
"type": "array",
"example": [
"บัญชี"
]
},
"description": {
"type": "string"
"type": "string",
"example": "เอกสารการเงิน"
},
"title": {
"type": "string"
"type": "string",
"example": "เอกสาร"
},
"file": {
"type": "string"
"type": "string",
"example": "เอกสาร 1"
}
},
"required": [
@ -831,7 +917,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -839,7 +926,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -847,7 +935,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
},
{
"in": "path",
@ -855,7 +944,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "เอกสาร 1"
}
],
"requestBody": {
@ -865,19 +955,37 @@
"schema": {
"properties": {
"keyword": {
"type": "string"
"items": {
"type": "string"
},
"type": "array",
"example": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
]
},
"category": {
"type": "string"
"items": {
"type": "string"
},
"type": "array",
"example": [
"บัญชี"
]
},
"description": {
"type": "string"
"type": "string",
"example": "เอกสารการเงินฉบับใหม่"
},
"title": {
"type": "string"
"type": "string",
"example": "เอกสารการเงิน"
},
"file": {
"type": "string"
"type": "string",
"example": "เอกสารใหม่"
}
},
"type": "object"
@ -910,7 +1018,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -918,7 +1027,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -926,7 +1036,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
},
{
"in": "path",
@ -934,7 +1045,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "เอกสารใหม่"
}
]
},
@ -1054,7 +1166,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -1062,7 +1175,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -1070,7 +1184,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
},
{
"in": "path",
@ -1078,7 +1193,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "เอกสารใหม่"
}
]
}
@ -1372,140 +1488,6 @@
}
}
},
"/storage/d": {
"get": {
"operationId": "GetFolder",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"items": {
"properties": {
"name": {
"type": "string"
},
"pathname": {
"type": "string"
}
},
"required": [
"name",
"pathname"
],
"type": "object"
},
"type": "array"
}
}
}
}
},
"security": [],
"parameters": [
{
"in": "query",
"name": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "bucket",
"required": false,
"schema": {
"type": "string"
}
}
]
},
"post": {
"operationId": "CreateFolder",
"responses": {
"201": {
"description": "Success"
}
},
"security": [],
"parameters": [
{
"in": "query",
"name": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "bucket",
"required": false,
"schema": {
"type": "string"
}
}
]
},
"put": {
"operationId": "UpdateFolder",
"responses": {
"204": {
"description": "Success"
}
},
"security": [],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"to": {
"properties": {
"path": {
"type": "string"
},
"bucket": {
"type": "string"
}
},
"required": [
"path",
"bucket"
],
"type": "object"
},
"from": {
"properties": {
"path": {
"type": "string"
},
"bucket": {
"type": "string"
}
},
"required": [
"path",
"bucket"
],
"type": "object"
}
},
"required": [
"to",
"from"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/subfolder": {
"get": {
"operationId": "ListFolder",
@ -1804,6 +1786,35 @@
"$ref": "#/components/schemas/StorageFile"
},
"type": "array"
},
"examples": {
"Example 1": {
"value": [
{
"pathname": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/แฟ้มย่อย 1/เอกสาร 1",
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/แฟ้มย่อย 1/",
"title": "เอกสาร",
"description": "เอกสารการเงิน",
"category": [
"บัญชี"
],
"keyword": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
],
"upload": false,
"fileName": "เอกสาร 1",
"fileSize": 10240,
"fileType": "application/pdf",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin",
"updatedAt": "2021-07-20T12:33:13.018Z",
"updatedBy": "admin"
}
]
}
}
}
}
@ -1824,7 +1835,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -1832,7 +1844,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -1840,7 +1853,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
},
{
"in": "path",
@ -1848,7 +1862,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้มย่อย 1"
}
]
},
@ -1862,10 +1877,16 @@
"schema": {
"properties": {
"keyword": {
"type": "string"
"items": {
"type": "string"
},
"type": "array"
},
"category": {
"type": "string"
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
@ -1917,6 +1938,33 @@
"createdAt"
],
"type": "object"
},
"examples": {
"Example 1": {
"value": {
"pathname": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/แฟ้มย่อย 1/เอกสาร 1",
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/แฟ้มย่อย 1/",
"title": "เอกสาร",
"description": "เอกสารการเงิน",
"category": [
"บัญชี"
],
"keyword": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
],
"upload": false,
"fileName": "เอกสาร 1",
"fileSize": 10240,
"fileType": "application/pdf",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin",
"updatedAt": "2021-07-20T12:33:13.018Z",
"updatedBy": "admin"
}
}
}
}
}
@ -1942,7 +1990,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -1950,7 +1999,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -1958,7 +2008,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
},
{
"in": "path",
@ -1966,7 +2017,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้มย่อย 1"
}
],
"requestBody": {
@ -1976,19 +2028,37 @@
"schema": {
"properties": {
"keyword": {
"type": "string"
"items": {
"type": "string"
},
"type": "array",
"example": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
]
},
"category": {
"type": "string"
"items": {
"type": "string"
},
"type": "array",
"example": [
"บัญชี"
]
},
"description": {
"type": "string"
"type": "string",
"example": "เอกสารการเงิน"
},
"title": {
"type": "string"
"type": "string",
"example": "เอกสาร"
},
"file": {
"type": "string"
"type": "string",
"example": "เอกสาร 1"
}
},
"required": [
@ -2049,7 +2119,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -2057,7 +2128,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -2065,7 +2137,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
},
{
"in": "path",
@ -2073,7 +2146,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้มย่อย 1"
},
{
"in": "path",
@ -2081,7 +2155,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "เอกสาร 1"
}
],
"requestBody": {
@ -2091,19 +2166,37 @@
"schema": {
"properties": {
"keyword": {
"type": "string"
"items": {
"type": "string"
},
"type": "array",
"example": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
]
},
"category": {
"type": "string"
"items": {
"type": "string"
},
"type": "array",
"example": [
"บัญชี"
]
},
"description": {
"type": "string"
"type": "string",
"example": "เอกสารการเงินฉบับใหม่"
},
"title": {
"type": "string"
"type": "string",
"example": "เอกสารการเงิน"
},
"file": {
"type": "string"
"type": "string",
"example": "เอกสารใหม่"
}
},
"type": "object"
@ -2136,7 +2229,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -2144,7 +2238,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -2152,7 +2247,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้ม 1"
},
{
"in": "path",
@ -2160,7 +2256,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "แฟ้มย่อย 1"
},
{
"in": "path",
@ -2168,7 +2265,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "เอกสาร 1"
}
]
},
@ -2288,7 +2386,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
@ -2296,7 +2395,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
@ -2304,6 +2404,14 @@
"required": true,
"schema": {
"type": "string"
},
"examples": {
"Example 1": {
"value": "แฟ้ม 1"
},
"Example 2": {
"value": "แฟ้มย่อย 1"
}
}
},
{
@ -2320,7 +2428,8 @@
"required": true,
"schema": {
"type": "string"
}
},
"example": "เอกสาร 1"
}
]
}