hrms-edm/Services/server/src/swagger.json

2485 lines
51 KiB
JSON
Raw Normal View History

2023-11-17 09:03:31 +07:00
{
"components": {
"examples": {},
"headers": {},
"parameters": {},
"requestBodies": {},
"responses": {},
"schemas": {
2023-11-27 14:11:27 +07:00
"StorageFolder": {
2023-11-17 09:03:31 +07:00
"properties": {
"pathname": {
"type": "string"
},
"name": {
"type": "string"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
"createdBy": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
}
},
"required": [
"pathname",
"name",
"createdAt",
"createdBy"
],
"type": "object",
"additionalProperties": false
2023-11-20 16:23:27 +07:00
},
2023-11-27 14:11:27 +07:00
"StorageFile": {
2023-11-20 16:23:27 +07:00
"properties": {
"pathname": {
"type": "string"
},
"fileName": {
"type": "string"
},
"fileSize": {
"type": "number",
"format": "double"
},
"fileType": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"items": {
"type": "string"
},
"type": "array"
},
"keyword": {
"items": {
"type": "string"
},
"type": "array"
},
"path": {
"type": "string"
},
2023-11-27 09:45:30 +07:00
"upload": {
"type": "boolean"
},
2023-11-20 16:23:27 +07:00
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
"updatedBy": {
"type": "string"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
"createdBy": {
"type": "string"
}
},
"required": [
"pathname",
"fileName",
"fileSize",
"fileType",
"title",
"description",
"category",
"keyword",
"path",
2023-11-27 09:45:30 +07:00
"upload",
2023-11-20 16:23:27 +07:00
"updatedAt",
"updatedBy",
"createdAt",
"createdBy"
],
"type": "object",
"additionalProperties": false
2023-11-21 11:47:10 +07:00
},
"Search": {
"properties": {
"AND": {
"items": {
"properties": {
"value": {
"type": "string"
},
"field": {
"type": "string"
}
},
"required": [
"value",
"field"
],
"type": "object"
},
"type": "array"
},
"OR": {
"items": {
"properties": {
"value": {
"type": "string"
},
"field": {
"type": "string"
}
},
"required": [
"value",
"field"
],
"type": "object"
},
"type": "array"
}
},
"type": "object",
"additionalProperties": false
2023-11-17 09:03:31 +07:00
}
},
"securitySchemes": {
"bearerAuth": {
"type": "apiKey",
"name": "Authorization",
"description": "Keycloak Bearer Token",
"in": "header"
}
}
},
"info": {
2023-11-27 09:45:30 +07:00
"title": "Enterprise Document Management(EDM) - API",
"version": "0.0.2",
"description": "Open API Specfication for Enterprise Document Management ",
2023-11-17 09:03:31 +07:00
"license": {
"name": "by Frappet",
"url": "https://frappet.com"
}
},
"openapi": "3.0.0",
"paths": {
"/cabinet": {
"get": {
"operationId": "ListCabinet",
"responses": {
"200": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ",
2023-11-17 09:03:31 +07:00
"content": {
"application/json": {
"schema": {
"items": {
2023-11-27 14:11:27 +07:00
"$ref": "#/components/schemas/StorageFolder"
2023-11-17 09:03:31 +07:00
},
"type": "array"
2023-11-27 14:32:08 +07:00
},
"examples": {
"Example 1": {
"value": [
{
"path": "ตู้เอกสาร 1/",
"name": "ตู้เอกสาร 1",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin"
},
{
"path": "ตู้เอกสาร 2/",
"name": "ตู้เอกสาร 2",
"createdAt": "2022-01-23T16:05:02.114Z",
"createdBy": "admin"
}
]
}
2023-11-17 09:03:31 +07:00
}
}
}
2023-11-27 09:45:30 +07:00
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถแสดงรายการตู้เอกสารได้ กรุณาลองใหม่ในภายหลัง"
2023-11-17 09:03:31 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ตู้เอกสาร"
2023-11-17 09:03:31 +07:00
],
2023-11-27 09:45:30 +07:00
"security": [
{
"bearerAuth": []
}
],
2023-11-17 09:03:31 +07:00
"parameters": []
},
"post": {
"operationId": "CreateCabinet",
"responses": {
"201": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"
2023-11-17 09:03:31 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ตู้เอกสาร"
2023-11-17 09:03:31 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
2023-11-17 09:03:31 +07:00
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
2023-11-27 14:32:08 +07:00
"type": "string",
"example": "ตู้เอกสาร 1"
2023-11-17 09:03:31 +07:00
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}": {
"put": {
"operationId": "EditCabinet",
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้"
2023-11-17 09:03:31 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ตู้เอกสาร"
2023-11-17 09:03:31 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
2023-11-17 09:03:31 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 14:32:08 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 09:03:31 +07:00
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
2023-11-27 14:32:08 +07:00
"type": "string",
"example": "ตู้เอกสารใหม่"
2023-11-17 09:03:31 +07:00
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteCabinet",
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถลบไฟล์ได้"
2023-11-17 09:03:31 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ตู้เอกสาร"
2023-11-17 09:03:31 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
2023-11-17 09:03:31 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 14:32:08 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 09:03:31 +07:00
}
]
}
},
"/cabinet/{cabinetName}/drawer": {
"get": {
"operationId": "ListDrawer",
"responses": {
"200": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ",
2023-11-17 09:03:31 +07:00
"content": {
"application/json": {
"schema": {
"items": {
2023-11-27 14:11:27 +07:00
"$ref": "#/components/schemas/StorageFolder"
2023-11-17 09:03:31 +07:00
},
"type": "array"
2023-11-27 16:07:32 +07:00
},
"examples": {
"Example 1": {
"value": [
{
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/",
"name": "ลิ้นชัก 1",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin"
},
{
"path": "ตู้เอกสาร 1/ลิ้นชัก 2/",
"name": "ลิ้นชัก 2",
"createdAt": "2022-01-23T16:05:02.114Z",
"createdBy": "admin"
}
]
}
2023-11-17 09:03:31 +07:00
}
}
}
2023-11-27 09:45:30 +07:00
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถแสดงรายการลิ้นชักได้ กรุณาลองใหม่ในภายหลัง"
2023-11-17 09:03:31 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ลิ้นชัก"
2023-11-17 09:03:31 +07:00
],
2023-11-27 09:45:30 +07:00
"security": [
{
"bearerAuth": []
}
],
2023-11-17 09:03:31 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 14:32:08 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 09:03:31 +07:00
}
]
},
"post": {
"operationId": "CreateDrawer",
"responses": {
"201": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"404": {
"description": "ไม่พบลิ้นชัก"
},
"500": {
"description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"
2023-11-17 09:03:31 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ลิ้นชัก"
2023-11-17 09:03:31 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
2023-11-17 09:03:31 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 14:32:08 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 09:03:31 +07:00
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
2023-11-27 16:07:32 +07:00
"type": "string",
"example": "ลิ้นชัก 1"
2023-11-17 09:03:31 +07:00
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}": {
"put": {
"operationId": "EditDrawer",
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้"
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ลิ้นชัก"
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 14:32:08 +07:00
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:07:32 +07:00
},
"example": "ลิ้นชัก 1"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
2023-11-27 16:07:32 +07:00
"type": "string",
"example": "ลิ้นชักใหม่"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteDrawer",
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ลิ้นชัก"
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 14:32:08 +07:00
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:07:32 +07:00
},
"example": "ลิ้นชัก 1"
}
]
}
},
2023-11-20 11:07:57 +07:00
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/file": {
2023-11-27 14:06:51 +07:00
"get": {
"operationId": "GetFile",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
2023-11-27 14:11:27 +07:00
"$ref": "#/components/schemas/StorageFile"
2023-11-27 14:06:51 +07:00
},
"type": "array"
2023-12-01 10:55:36 +07:00
},
"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"
}
]
}
2023-11-27 14:06:51 +07:00
}
}
}
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-27 14:06:51 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-27 14:06:51 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
2023-11-27 14:06:51 +07:00
}
]
},
2023-11-17 09:03:31 +07:00
"post": {
"operationId": "UploadFile",
"responses": {
2023-11-20 11:07:57 +07:00
"201": {
2023-11-27 12:04:59 +07:00
"description": "สำเร็จ",
2023-11-27 09:45:30 +07:00
"content": {
"application/json": {
"schema": {
"properties": {
"keyword": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array"
2023-11-27 09:45:30 +07:00
},
"category": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array"
2023-11-27 09:45:30 +07:00
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"file": {
"type": "string"
},
"upload": {
"type": "string"
},
"updatedBy": {
"type": "string"
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
"createdBy": {
"type": "string"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
}
},
"required": [
"file",
"upload",
"updatedBy",
"updatedAt",
"createdBy",
"createdAt"
],
"type": "object"
2023-12-01 10:55:36 +07:00
},
"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"
}
}
2023-11-27 09:45:30 +07:00
}
}
}
2023-11-27 12:04:59 +07:00
},
"404": {
2023-11-27 13:41:46 +07:00
"description": "ตำแหน่งที่ระบุไม่พบ กรุณาเตรียมตำแหน่งที่ต้องการก่อนดำเนินการ"
2023-11-17 09:03:31 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ไฟล์"
],
2023-11-20 11:07:57 +07:00
"security": [
{
2023-11-27 12:04:59 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 12:04:59 +07:00
]
2023-11-20 11:07:57 +07:00
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
}
],
2023-11-17 09:03:31 +07:00
"requestBody": {
"required": true,
"content": {
2023-11-27 09:45:30 +07:00
"application/json": {
2023-11-17 09:03:31 +07:00
"schema": {
"properties": {
2023-11-27 09:45:30 +07:00
"keyword": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array",
"example": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
]
2023-11-17 09:03:31 +07:00
},
2023-11-27 09:45:30 +07:00
"category": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array",
"example": [
"บัญชี"
]
},
"description": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสารการเงิน"
},
2023-11-27 09:45:30 +07:00
"title": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสาร"
},
2023-11-27 09:45:30 +07:00
"file": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสาร 1"
2023-11-17 09:03:31 +07:00
}
},
"required": [
2023-11-27 09:45:30 +07:00
"file"
],
"type": "object"
2023-11-17 09:03:31 +07:00
}
}
}
}
2023-11-20 14:13:26 +07:00
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/file/{fileName}": {
"patch": {
"operationId": "UpdateFile",
"responses": {
"200": {
2023-11-27 12:04:59 +07:00
"description": "สำเร็จ",
2023-11-27 09:45:30 +07:00
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"properties": {
"upload": {
"type": "string"
}
},
"required": [
"upload"
],
"type": "object"
}
]
}
}
}
2023-11-27 12:04:59 +07:00
},
"204": {
"description": "สำเร็จ"
},
2023-11-27 12:04:59 +07:00
"404": {
"description": "ไม่พบตำแหน่งที่ต้องการสร้างแฟ้ม"
2023-11-20 14:13:26 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ไฟล์"
2023-11-20 14:13:26 +07:00
],
2023-11-20 12:04:26 +07:00
"security": [
{
2023-11-27 12:04:59 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 12:04:59 +07:00
]
2023-11-20 12:04:26 +07:00
}
],
2023-11-17 09:03:31 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
2023-11-17 09:03:31 +07:00
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 09:03:31 +07:00
},
{
"in": "path",
"name": "drawerName",
2023-11-17 09:03:31 +07:00
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-17 09:03:31 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
2023-11-17 09:03:31 +07:00
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
2023-11-20 14:13:26 +07:00
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "เอกสาร 1"
2023-11-17 09:03:31 +07:00
}
2023-11-20 14:13:26 +07:00
],
"requestBody": {
2023-11-27 09:45:30 +07:00
"required": true,
2023-11-20 14:13:26 +07:00
"content": {
2023-11-27 09:45:30 +07:00
"application/json": {
2023-11-20 14:13:26 +07:00
"schema": {
"properties": {
2023-11-27 09:45:30 +07:00
"keyword": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array",
"example": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
]
2023-11-20 14:13:26 +07:00
},
2023-11-27 09:45:30 +07:00
"category": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array",
"example": [
"บัญชี"
]
2023-11-20 14:13:26 +07:00
},
"description": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสารการเงินฉบับใหม่"
2023-11-20 14:13:26 +07:00
},
2023-11-27 09:45:30 +07:00
"title": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสารการเงิน"
2023-11-20 14:13:26 +07:00
},
2023-11-27 09:45:30 +07:00
"file": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสารใหม่"
2023-11-20 14:13:26 +07:00
}
2023-11-27 09:45:30 +07:00
},
"type": "object"
2023-11-20 14:13:26 +07:00
}
}
}
}
},
2023-11-20 12:03:28 +07:00
"delete": {
2023-11-20 11:50:18 +07:00
"operationId": "DeleteFile",
"responses": {
"200": {
2023-11-27 12:04:59 +07:00
"description": "สำเร็จ"
2023-11-20 11:50:18 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ไฟล์"
2023-11-20 11:50:18 +07:00
],
2023-11-20 12:04:26 +07:00
"security": [
{
2023-11-27 12:04:59 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 12:04:59 +07:00
]
2023-11-20 12:04:26 +07:00
}
],
2023-11-20 11:50:18 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-20 11:50:18 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-20 11:50:18 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
2023-11-20 11:50:18 +07:00
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "เอกสารใหม่"
2023-11-20 11:50:18 +07:00
}
]
2023-11-22 14:45:56 +07:00
},
"get": {
"operationId": "DownloadFile",
"responses": {
"200": {
2023-11-27 13:41:46 +07:00
"description": "สำเร็จ",
2023-11-22 14:45:56 +07:00
"content": {
"application/json": {
"schema": {
"properties": {
"createdBy": {
"type": "string"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
"updatedBy": {
"type": "string"
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
2023-11-27 09:45:30 +07:00
"upload": {
"type": "boolean"
},
"path": {
"type": "string"
},
2023-11-22 14:45:56 +07:00
"keyword": {
"items": {
"type": "string"
},
"type": "array"
},
"category": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"fileType": {
"type": "string"
},
"fileSize": {
"type": "number",
"format": "double"
},
"fileName": {
"type": "string"
},
"pathname": {
"type": "string"
},
"download": {
"type": "string"
}
},
"required": [
"createdBy",
"createdAt",
"updatedBy",
"updatedAt",
2023-11-27 09:45:30 +07:00
"upload",
"path",
2023-11-22 14:45:56 +07:00
"keyword",
"category",
"description",
"title",
"fileType",
"fileSize",
"fileName",
"pathname",
"download"
],
"type": "object"
}
}
}
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ดาวน์โหลด"
2023-11-22 14:45:56 +07:00
],
2023-11-27 13:41:46 +07:00
"security": [
{
"bearerAuth": []
}
],
2023-11-22 14:45:56 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-22 14:45:56 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-22 14:45:56 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
2023-11-22 14:45:56 +07:00
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "เอกสารใหม่"
2023-11-22 14:45:56 +07:00
}
]
2023-11-20 11:50:18 +07:00
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder": {
"get": {
"operationId": "ListFolder",
"responses": {
"200": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
2023-11-27 14:11:27 +07:00
"$ref": "#/components/schemas/StorageFolder"
},
"type": "array"
2023-11-27 16:55:52 +07:00
},
"examples": {
"Example 1": {
"value": [
{
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1",
"name": "แฟ้ม 1",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin"
},
{
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 2",
"name": "แฟ้ม 2",
"createdAt": "2022-01-23T16:05:02.114Z",
"createdBy": "admin"
}
]
}
}
2023-11-17 09:03:31 +07:00
}
}
2023-11-27 09:45:30 +07:00
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถแสดงรายการแฟ้มได้ กรุณาลองใหม่ในภายหลัง"
2023-11-17 09:03:31 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"แฟ้ม"
2023-11-17 09:03:31 +07:00
],
2023-11-27 09:45:30 +07:00
"security": [
{
"bearerAuth": []
}
],
2023-11-17 09:03:31 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
2023-11-17 09:03:31 +07:00
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 09:03:31 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "ลิ้นชัก 1"
}
]
},
"post": {
"operationId": "CreateFolder",
"responses": {
"201": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"404": {
2023-11-27 12:04:59 +07:00
"description": "ไม่พบตำแหน่งที่ต้องการสร้างแฟ้ม"
2023-11-27 09:45:30 +07:00
},
"500": {
"description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"แฟ้ม"
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
2023-11-17 09:03:31 +07:00
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 09:03:31 +07:00
},
{
"in": "path",
"name": "drawerName",
2023-11-17 09:03:31 +07:00
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-17 09:03:31 +07:00
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
2023-11-27 16:41:27 +07:00
"type": "string",
"example": "แฟ้ม 1"
2023-11-17 09:03:31 +07:00
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
}
2023-11-17 15:17:12 +07:00
},
2023-11-20 11:07:57 +07:00
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}": {
"put": {
"operationId": "EditFolder",
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้"
2023-11-20 11:07:57 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"แฟ้ม"
2023-11-20 11:07:57 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
2023-11-20 11:07:57 +07:00
}
],
"parameters": [
{
"in": "path",
2023-11-20 11:07:57 +07:00
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-20 11:07:57 +07:00
},
{
"in": "path",
2023-11-20 11:07:57 +07:00
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-20 11:07:57 +07:00
},
{
"in": "path",
2023-11-20 11:07:57 +07:00
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "แฟ้ม 1"
2023-11-20 11:07:57 +07:00
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
2023-11-27 16:41:27 +07:00
"type": "string",
"example": "แฟ้มใหม่"
2023-11-20 11:07:57 +07:00
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteFolder",
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
2023-11-20 11:07:57 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"แฟ้ม"
2023-11-20 11:07:57 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
2023-11-20 11:07:57 +07:00
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-20 11:07:57 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-20 11:07:57 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:41:27 +07:00
},
"example": "แฟ้ม 1"
2023-11-20 11:07:57 +07:00
}
]
}
},
2023-11-21 09:24:46 +07:00
"/search": {
"post": {
"operationId": "SearchFile",
"responses": {
"200": {
"description": "สำเร็จ",
2023-11-21 09:24:46 +07:00
"content": {
"application/json": {
"schema": {
2023-11-21 11:47:10 +07:00
"items": {
2023-11-27 14:11:27 +07:00
"$ref": "#/components/schemas/StorageFile"
2023-11-21 11:47:10 +07:00
},
2023-11-21 09:24:46 +07:00
"type": "array"
}
}
}
}
},
2023-11-21 11:47:10 +07:00
"tags": [
2023-11-27 14:06:51 +07:00
"ค้นหา"
2023-11-21 11:47:10 +07:00
],
"security": [
{
"bearerAuth": []
}
],
2023-11-21 11:47:10 +07:00
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Search"
}
}
}
}
2023-11-21 09:24:46 +07:00
}
},
2023-11-17 15:17:12 +07:00
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/subfolder": {
"get": {
"operationId": "ListFolder",
"responses": {
"200": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ",
2023-11-17 15:17:12 +07:00
"content": {
"application/json": {
"schema": {
"items": {
2023-11-27 14:11:27 +07:00
"$ref": "#/components/schemas/StorageFolder"
2023-11-17 15:17:12 +07:00
},
"type": "array"
2023-11-27 16:55:52 +07:00
},
"examples": {
"Example 1": {
"value": [
{
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/แฟ้มย่อย 1",
"name": "แฟ้มย่อย 1",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin"
},
{
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/แฟ้มย่อย 2",
"name": "แฟ้มย่อย 2",
"createdAt": "2022-01-23T16:05:02.114Z",
"createdBy": "admin"
}
]
}
2023-11-17 15:17:12 +07:00
}
}
}
2023-11-27 09:45:30 +07:00
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถแสดงรายการแฟ้มได้ กรุณาลองใหม่ในภายหลัง"
2023-11-17 15:17:12 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"แฟ้มย่อย"
2023-11-17 15:17:12 +07:00
],
2023-11-27 09:45:30 +07:00
"security": [
{
"bearerAuth": []
}
],
2023-11-17 15:17:12 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "แฟ้ม 1"
2023-11-17 15:17:12 +07:00
}
]
},
"post": {
"operationId": "CreateFolder",
"responses": {
"201": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"404": {
"description": "ไม่พบของแฟ้ม"
},
"500": {
"description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"
2023-11-17 15:17:12 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"แฟ้มย่อย"
2023-11-17 15:17:12 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
2023-11-17 15:17:12 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "แฟ้ม 1"
2023-11-17 15:17:12 +07:00
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/subfolder/{subFolderName}": {
"put": {
"operationId": "EditFolder",
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้"
2023-11-17 15:17:12 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"แฟ้มย่อย"
2023-11-17 15:17:12 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
2023-11-17 15:17:12 +07:00
"parameters": [
{
"in": "path",
2023-11-17 15:17:12 +07:00
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
2023-11-17 15:17:12 +07:00
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
2023-11-17 15:17:12 +07:00
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "แฟ้ม 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
2023-11-17 15:17:12 +07:00
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "แฟ้มย่อย 1"
2023-11-17 15:17:12 +07:00
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
2023-11-27 16:55:52 +07:00
"type": "string",
"example": "แฟ้มใหม่"
2023-11-17 15:17:12 +07:00
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteFolder",
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
2023-11-17 15:17:12 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"แฟ้มย่อย"
2023-11-17 15:17:12 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 09:45:30 +07:00
]
}
],
2023-11-17 15:17:12 +07:00
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "แฟ้ม 1"
2023-11-17 15:17:12 +07:00
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
2023-11-27 16:55:52 +07:00
},
"example": "แฟ้มย่อย 1"
2023-11-17 15:17:12 +07:00
}
]
}
2023-11-20 15:54:19 +07:00
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/subfolder/{subFolderName}/file": {
2023-11-27 14:06:51 +07:00
"get": {
"operationId": "GetFile",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
2023-11-27 14:11:27 +07:00
"$ref": "#/components/schemas/StorageFile"
2023-11-27 14:06:51 +07:00
},
"type": "array"
2023-12-01 10:55:36 +07:00
},
"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"
}
]
}
2023-11-27 14:06:51 +07:00
}
}
}
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-27 14:06:51 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-27 14:06:51 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
2023-11-27 14:06:51 +07:00
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้มย่อย 1"
2023-11-27 14:06:51 +07:00
}
]
},
2023-11-20 15:54:19 +07:00
"post": {
"operationId": "UploadFile",
"responses": {
"201": {
2023-11-27 13:41:46 +07:00
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"properties": {
"keyword": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array"
2023-11-27 13:41:46 +07:00
},
"category": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array"
2023-11-27 13:41:46 +07:00
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"file": {
"type": "string"
},
"upload": {
"type": "string"
},
"updatedBy": {
"type": "string"
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
"createdBy": {
"type": "string"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
}
},
"required": [
"file",
"upload",
"updatedBy",
"updatedAt",
"createdBy",
"createdAt"
],
"type": "object"
2023-12-01 10:55:36 +07:00
},
"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"
}
}
2023-11-27 13:41:46 +07:00
}
}
}
},
"404": {
"description": "ตำแหน่งที่ระบุไม่พบ กรุณาเตรียมตำแหน่งที่ต้องการก่อนดำเนินการ"
2023-11-20 15:54:19 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ไฟล์"
2023-11-20 15:54:19 +07:00
],
"security": [
{
2023-11-27 13:41:46 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 13:41:46 +07:00
]
2023-11-20 15:54:19 +07:00
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้มย่อย 1"
2023-11-20 15:54:19 +07:00
}
],
"requestBody": {
"required": true,
"content": {
2023-11-27 13:41:46 +07:00
"application/json": {
2023-11-20 15:54:19 +07:00
"schema": {
"properties": {
2023-11-27 13:41:46 +07:00
"keyword": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array",
"example": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
]
2023-11-20 15:54:19 +07:00
},
2023-11-27 13:41:46 +07:00
"category": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array",
"example": [
"บัญชี"
]
2023-11-20 15:54:19 +07:00
},
"description": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสารการเงิน"
2023-11-20 15:54:19 +07:00
},
2023-11-27 13:41:46 +07:00
"title": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสาร"
2023-11-20 15:54:19 +07:00
},
2023-11-27 13:41:46 +07:00
"file": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสาร 1"
2023-11-20 15:54:19 +07:00
}
},
"required": [
2023-11-27 13:41:46 +07:00
"file"
],
"type": "object"
2023-11-20 15:54:19 +07:00
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/subfolder/{subFolderName}/file/{fileName}": {
"patch": {
"operationId": "UpdateFile",
"responses": {
"200": {
2023-11-27 13:41:46 +07:00
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"properties": {
"upload": {
"type": "string"
}
},
"required": [
"upload"
],
"type": "object"
}
]
}
}
}
},
"404": {
"description": "ไม่พบตำแหน่งที่ต้องการสร้างแฟ้ม"
2023-11-20 15:54:19 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ไฟล์"
2023-11-20 15:54:19 +07:00
],
"security": [
{
2023-11-27 13:41:46 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 13:41:46 +07:00
]
2023-11-20 15:54:19 +07:00
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้มย่อย 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "เอกสาร 1"
2023-11-20 15:54:19 +07:00
}
],
"requestBody": {
2023-11-27 13:41:46 +07:00
"required": true,
2023-11-20 15:54:19 +07:00
"content": {
2023-11-27 13:41:46 +07:00
"application/json": {
2023-11-20 15:54:19 +07:00
"schema": {
"properties": {
2023-11-27 13:41:46 +07:00
"keyword": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array",
"example": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
]
2023-11-20 15:54:19 +07:00
},
2023-11-27 13:41:46 +07:00
"category": {
2023-12-01 10:55:36 +07:00
"items": {
"type": "string"
},
"type": "array",
"example": [
"บัญชี"
]
2023-11-20 15:54:19 +07:00
},
"description": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสารการเงินฉบับใหม่"
2023-11-20 15:54:19 +07:00
},
2023-11-27 13:41:46 +07:00
"title": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสารการเงิน"
2023-11-20 15:54:19 +07:00
},
2023-11-27 13:41:46 +07:00
"file": {
2023-12-01 10:55:36 +07:00
"type": "string",
"example": "เอกสารใหม่"
2023-11-20 15:54:19 +07:00
}
2023-11-27 13:41:46 +07:00
},
"type": "object"
2023-11-20 15:54:19 +07:00
}
}
}
}
},
"delete": {
"operationId": "DeleteFile",
"responses": {
"200": {
2023-11-27 13:41:46 +07:00
"description": "สำเร็จ"
2023-11-20 15:54:19 +07:00
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ไฟล์"
2023-11-20 15:54:19 +07:00
],
"security": [
{
2023-11-27 13:41:46 +07:00
"bearerAuth": [
"admin",
"management-role"
2023-11-27 13:41:46 +07:00
]
2023-11-20 15:54:19 +07:00
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้ม 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "แฟ้มย่อย 1"
2023-11-20 15:54:19 +07:00
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "เอกสาร 1"
2023-11-20 15:54:19 +07:00
}
]
2023-11-22 14:45:56 +07:00
},
"get": {
"operationId": "DownloadFile",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"properties": {
"createdBy": {
"type": "string"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
"updatedBy": {
"type": "string"
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
2023-11-27 09:45:30 +07:00
"upload": {
"type": "boolean"
},
"path": {
"type": "string"
},
2023-11-22 14:45:56 +07:00
"keyword": {
"items": {
"type": "string"
},
"type": "array"
},
"category": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"fileType": {
"type": "string"
},
"fileSize": {
"type": "number",
"format": "double"
},
"fileName": {
"type": "string"
},
"pathname": {
"type": "string"
},
"download": {
"type": "string"
}
},
"required": [
"createdBy",
"createdAt",
"updatedBy",
"updatedAt",
2023-11-27 09:45:30 +07:00
"upload",
"path",
2023-11-22 14:45:56 +07:00
"keyword",
"category",
"description",
"title",
"fileType",
"fileSize",
"fileName",
"pathname",
"download"
],
"type": "object"
}
}
}
}
},
"tags": [
2023-11-27 14:06:51 +07:00
"ดาวน์โหลด"
],
"security": [
{
"bearerAuth": []
}
2023-11-22 14:45:56 +07:00
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ตู้เอกสาร 1"
2023-11-22 14:45:56 +07:00
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "ลิ้นชัก 1"
2023-11-22 14:45:56 +07:00
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"examples": {
"Example 1": {
"value": "แฟ้ม 1"
},
"Example 2": {
"value": "แฟ้มย่อย 1"
}
2023-11-22 14:45:56 +07:00
}
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
2023-12-01 10:55:36 +07:00
},
"example": "เอกสาร 1"
2023-11-22 14:45:56 +07:00
}
]
2023-11-20 15:54:19 +07:00
}
2023-11-17 09:03:31 +07:00
}
},
"servers": [
{
"url": "/api"
}
],
2023-11-27 14:06:51 +07:00
"tags": [
{
"name": "ตู้เอกสาร"
},
{
"name": "ลิ้นชัก"
},
{
"name": "แฟ้ม"
},
{
"name": "แฟ้มย่อย"
},
{
"name": "ไฟล์"
},
{
"name": "ดาวน์โหลด"
},
{
"name": "ค้นหา"
}
],
2023-11-17 09:03:31 +07:00
"basePath": "/api"
}