hrms-edm/Services/server/src/swagger.json
2023-11-27 16:55:52 +07:00

2225 lines
No EOL
42 KiB
JSON

{
"components": {
"examples": {},
"headers": {},
"parameters": {},
"requestBodies": {},
"responses": {},
"schemas": {
"StorageFolder": {
"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
},
"StorageFile": {
"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"
},
"upload": {
"type": "boolean"
},
"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",
"upload",
"updatedAt",
"updatedBy",
"createdAt",
"createdBy"
],
"type": "object",
"additionalProperties": false
},
"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
}
},
"securitySchemes": {
"bearerAuth": {
"type": "apiKey",
"name": "Authorization",
"description": "Keycloak Bearer Token",
"in": "header"
}
}
},
"info": {
"title": "Enterprise Document Management(EDM) - API",
"version": "0.0.2",
"description": "Open API Specfication for Enterprise Document Management ",
"license": {
"name": "by Frappet",
"url": "https://frappet.com"
}
},
"openapi": "3.0.0",
"paths": {
"/cabinet": {
"get": {
"operationId": "ListCabinet",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/StorageFolder"
},
"type": "array"
},
"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"
}
]
}
}
}
}
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถแสดงรายการตู้เอกสารได้ กรุณาลองใหม่ในภายหลัง"
}
},
"tags": [
"ตู้เอกสาร"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": []
},
"post": {
"operationId": "CreateCabinet",
"responses": {
"201": {
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"
}
},
"tags": [
"ตู้เอกสาร"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "ตู้เอกสาร 1"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}": {
"put": {
"operationId": "EditCabinet",
"responses": {
"204": {
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้"
}
},
"tags": [
"ตู้เอกสาร"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "ตู้เอกสารใหม่"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteCabinet",
"responses": {
"204": {
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถลบไฟล์ได้"
}
},
"tags": [
"ตู้เอกสาร"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
}
]
}
},
"/cabinet/{cabinetName}/drawer": {
"get": {
"operationId": "ListDrawer",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/StorageFolder"
},
"type": "array"
},
"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"
}
]
}
}
}
}
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถแสดงรายการลิ้นชักได้ กรุณาลองใหม่ในภายหลัง"
}
},
"tags": [
"ลิ้นชัก"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
}
]
},
"post": {
"operationId": "CreateDrawer",
"responses": {
"201": {
"description": "สำเร็จ"
},
"404": {
"description": "ไม่พบลิ้นชัก"
},
"500": {
"description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"
}
},
"tags": [
"ลิ้นชัก"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "ลิ้นชัก 1"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}": {
"put": {
"operationId": "EditDrawer",
"responses": {
"204": {
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้"
}
},
"tags": [
"ลิ้นชัก"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "ลิ้นชักใหม่"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteDrawer",
"responses": {
"204": {
"description": "สำเร็จ"
}
},
"tags": [
"ลิ้นชัก"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
}
]
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/file": {
"get": {
"operationId": "GetFile",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/StorageFile"
},
"type": "array"
}
}
}
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"post": {
"operationId": "UploadFile",
"responses": {
"201": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"properties": {
"keyword": {
"type": "string"
},
"category": {
"type": "string"
},
"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": [
"keyword",
"category",
"description",
"title",
"file",
"upload",
"updatedBy",
"updatedAt",
"createdBy",
"createdAt"
],
"type": "object"
}
}
}
},
"404": {
"description": "ตำแหน่งที่ระบุไม่พบ กรุณาเตรียมตำแหน่งที่ต้องการก่อนดำเนินการ"
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"keyword": {
"type": "string"
},
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"file": {
"type": "string"
}
},
"required": [
"keyword",
"category",
"description",
"title",
"file"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/file/{fileName}": {
"patch": {
"operationId": "UpdateFile",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"properties": {
"upload": {
"type": "string"
}
},
"required": [
"upload"
],
"type": "object"
}
]
}
}
}
},
"404": {
"description": "ไม่พบตำแหน่งที่ต้องการสร้างแฟ้ม"
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"keyword": {
"type": "string"
},
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"file": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteFile",
"responses": {
"200": {
"description": "สำเร็จ"
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"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"
}
]
},
"upload": {
"type": "boolean"
},
"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",
"upload",
"keyword",
"category",
"description",
"title",
"fileType",
"fileSize",
"fileName",
"pathname",
"download"
],
"type": "object"
}
}
}
}
},
"tags": [
"ดาวน์โหลด"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
}
}
]
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder": {
"get": {
"operationId": "ListFolder",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/StorageFolder"
},
"type": "array"
},
"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"
}
]
}
}
}
}
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถแสดงรายการแฟ้มได้ กรุณาลองใหม่ในภายหลัง"
}
},
"tags": [
"แฟ้ม"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
}
]
},
"post": {
"operationId": "CreateFolder",
"responses": {
"201": {
"description": "สำเร็จ"
},
"404": {
"description": "ไม่พบตำแหน่งที่ต้องการสร้างแฟ้ม"
},
"500": {
"description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"
}
},
"tags": [
"แฟ้ม"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "แฟ้ม 1"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}": {
"put": {
"operationId": "EditFolder",
"responses": {
"204": {
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้"
}
},
"tags": [
"แฟ้ม"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
},
"example": "แฟ้ม 1"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "แฟ้มใหม่"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteFolder",
"responses": {
"204": {
"description": "สำเร็จ"
}
},
"tags": [
"แฟ้ม"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
},
"example": "แฟ้ม 1"
}
]
}
},
"/search": {
"post": {
"operationId": "SearchFile",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/StorageFile"
},
"type": "array"
}
}
}
}
},
"tags": [
"ค้นหา"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Search"
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/subfolder": {
"get": {
"operationId": "ListFolder",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/StorageFolder"
},
"type": "array"
},
"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"
}
]
}
}
}
}
},
"500": {
"description": "เกิดข้อผิดพลาด ไม่สามารถแสดงรายการแฟ้มได้ กรุณาลองใหม่ในภายหลัง"
}
},
"tags": [
"แฟ้มย่อย"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
},
"example": "แฟ้ม 1"
}
]
},
"post": {
"operationId": "CreateFolder",
"responses": {
"201": {
"description": "สำเร็จ"
},
"404": {
"description": "ไม่พบของแฟ้ม"
},
"500": {
"description": "เกิดข้อผิดพลาดกับระบบจัดการไฟล์"
}
},
"tags": [
"แฟ้มย่อย"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
},
"example": "แฟ้ม 1"
}
],
"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": {
"description": "สำเร็จ"
},
"500": {
"description": "เกิดข้อผิดพลาดไม่สามารถย้ายไฟล์ได้"
}
},
"tags": [
"แฟ้มย่อย"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
},
"example": "แฟ้ม 1"
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
},
"example": "แฟ้มย่อย 1"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"example": "แฟ้มใหม่"
}
},
"required": [
"name"
],
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteFolder",
"responses": {
"204": {
"description": "สำเร็จ"
}
},
"tags": [
"แฟ้มย่อย"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
},
"example": "ตู้เอกสาร 1"
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
},
"example": "ลิ้นชัก 1"
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
},
"example": "แฟ้ม 1"
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
},
"example": "แฟ้มย่อย 1"
}
]
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/subfolder/{subFolderName}/file": {
"get": {
"operationId": "GetFile",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/StorageFile"
},
"type": "array"
}
}
}
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"post": {
"operationId": "UploadFile",
"responses": {
"201": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"properties": {
"keyword": {
"type": "string"
},
"category": {
"type": "string"
},
"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": [
"keyword",
"category",
"description",
"title",
"file",
"upload",
"updatedBy",
"updatedAt",
"createdBy",
"createdAt"
],
"type": "object"
}
}
}
},
"404": {
"description": "ตำแหน่งที่ระบุไม่พบ กรุณาเตรียมตำแหน่งที่ต้องการก่อนดำเนินการ"
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"keyword": {
"type": "string"
},
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"file": {
"type": "string"
}
},
"required": [
"keyword",
"category",
"description",
"title",
"file"
],
"type": "object"
}
}
}
}
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}/subfolder/{subFolderName}/file/{fileName}": {
"patch": {
"operationId": "UpdateFile",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"properties": {
"upload": {
"type": "string"
}
},
"required": [
"upload"
],
"type": "object"
}
]
}
}
}
},
"404": {
"description": "ไม่พบตำแหน่งที่ต้องการสร้างแฟ้ม"
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"keyword": {
"type": "string"
},
"category": {
"type": "string"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
},
"file": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"delete": {
"operationId": "DeleteFile",
"responses": {
"200": {
"description": "สำเร็จ"
}
},
"tags": [
"ไฟล์"
],
"security": [
{
"bearerAuth": [
"admin"
]
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"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"
}
]
},
"upload": {
"type": "boolean"
},
"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",
"upload",
"keyword",
"category",
"description",
"title",
"fileType",
"fileSize",
"fileName",
"pathname",
"download"
],
"type": "object"
}
}
}
}
},
"tags": [
"ดาวน์โหลด"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "folderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "subFolderName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "fileName",
"required": true,
"schema": {
"type": "string"
}
}
]
}
}
},
"servers": [
{
"url": "/api"
}
],
"tags": [
{
"name": "ตู้เอกสาร"
},
{
"name": "ลิ้นชัก"
},
{
"name": "แฟ้ม"
},
{
"name": "แฟ้มย่อย"
},
{
"name": "ไฟล์"
},
{
"name": "ดาวน์โหลด"
},
{
"name": "ค้นหา"
}
],
"basePath": "/api"
}