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

1333 lines
27 KiB
JSON
Raw Normal View History

2023-11-17 09:03:31 +07:00
{
"components": {
"examples": {},
"headers": {},
"parameters": {},
"requestBodies": {},
"responses": {},
"schemas": {
2023-12-26 14:52:02 +07:00
"Record_string.unknown_": {
"properties": {},
"type": "object",
"description": "Construct a type with a set of properties K of type T"
},
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"
},
2023-12-26 14:52:02 +07:00
"author": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/Record_string.unknown_"
},
"path": {
"type": "string"
},
2023-11-27 09:45:30 +07:00
"upload": {
"type": "boolean"
},
2023-12-15 10:08:06 +07:00
"hidden": {
"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",
2023-12-26 14:52:02 +07:00
"author",
"metadata",
"path",
2023-11-27 09:45:30 +07:00
"upload",
2023-12-15 10:08:06 +07:00
"hidden",
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": {
2023-12-14 15:35:18 +07:00
"exact": {
"type": "boolean"
},
2023-11-21 11:47:10 +07:00
"value": {
"type": "string"
},
"field": {
"type": "string"
}
},
"required": [
"value",
"field"
],
"type": "object"
},
"type": "array"
},
"OR": {
"items": {
"properties": {
2023-12-14 15:35:18 +07:00
"exact": {
"type": "boolean"
},
2023-11-21 11:47:10 +07:00
"value": {
"type": "string"
},
"field": {
"type": "string"
}
},
"required": [
"value",
"field"
],
"type": "object"
},
"type": "array"
2023-12-14 15:35:18 +07:00
},
"exact": {
"type": "boolean"
2024-01-12 11:08:01 +07:00
},
"recursive": {
"type": "boolean"
},
"path": {
"items": {
"type": "string"
},
"type": "array"
2023-11-21 11:47:10 +07:00
}
},
"type": "object",
"additionalProperties": false
},
"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
},
"ListRequestBody": {
"properties": {
"operation": {
"type": "string",
"enum": [
"folder",
"file"
]
},
"path": {
"items": {
"type": "string"
},
"type": "array"
2023-12-15 10:08:06 +07:00
},
"hidden": {
"type": "boolean"
}
},
"required": [
"operation",
"path"
],
"type": "object",
"additionalProperties": false
},
2023-12-12 12:01:56 +07:00
"FolderBody": {
"properties": {
"path": {
"items": {
"type": "string"
},
2023-12-12 12:01:56 +07:00
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2"
]
},
"name": {
2023-12-12 12:01:56 +07:00
"type": "string",
"example": "แฟ้ม 3"
}
},
"required": [
"path",
"name"
],
"type": "object",
"additionalProperties": false
},
"PutFolderBody": {
"properties": {
"from": {
"properties": {
"name": {
2023-12-12 12:01:56 +07:00
"type": "string",
"example": "แฟ้ม 3"
},
"path": {
"items": {
"type": "string"
},
2023-12-12 12:01:56 +07:00
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2"
]
}
},
"required": [
"name",
"path"
],
"type": "object"
},
"to": {
"properties": {
"name": {
2023-12-12 12:01:56 +07:00
"type": "string",
"example": "แฟ้ม 3 แก้ไข"
},
"path": {
"items": {
"type": "string"
},
2023-12-12 12:01:56 +07:00
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2"
]
}
},
"required": [
"name",
"path"
],
"type": "object"
}
},
"required": [
"from",
"to"
],
"type": "object",
"additionalProperties": false
},
"DeleteFolderBody": {
"properties": {
"path": {
"items": {
"type": "string"
},
2023-12-12 12:01:56 +07:00
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2",
"แฟ้ม 3 แก้ไข"
]
}
},
"required": [
"path"
],
"type": "object",
"additionalProperties": false
},
2023-12-26 14:52:02 +07:00
"Record_string.any_": {
"properties": {},
"type": "object",
"description": "Construct a type with a set of properties K of type T"
},
2023-12-12 12:01:56 +07:00
"FileBody": {
"properties": {
"path": {
"items": {
"type": "string"
},
2023-12-12 12:01:56 +07:00
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2",
"แฟ้ม 3"
]
},
"file": {
2023-12-12 12:01:56 +07:00
"type": "string",
"example": "ไฟล์ 1.xlsx"
},
"title": {
2023-12-12 12:01:56 +07:00
"type": "string",
"example": "การเงิน"
},
"description": {
2023-12-12 12:01:56 +07:00
"type": "string",
"example": "การเงิน"
},
2023-12-26 14:52:02 +07:00
"author": {
"type": "string",
"example": "นายก"
},
"category": {
"items": {
"type": "string"
},
2023-12-12 12:01:56 +07:00
"type": "array",
"example": [
"การเงิน",
"รายงาน"
]
},
"keyword": {
"items": {
"type": "string"
},
2023-12-12 12:01:56 +07:00
"type": "array",
"example": [
"การเงิน",
"รายรับ",
"รายจ่าย"
]
2023-12-15 10:08:06 +07:00
},
2023-12-26 14:52:02 +07:00
"metadata": {
"properties": {},
"additionalProperties": {},
"type": "object",
"example": {}
},
2023-12-15 10:08:06 +07:00
"hidden": {
"type": "boolean",
"example": false
2023-12-12 12:01:56 +07:00
}
},
"required": [
"path",
"file"
],
"type": "object",
"additionalProperties": false
},
"PutFileBody": {
"properties": {
"hidden": {
"type": "boolean",
"example": false
},
"keyword": {
"items": {
"type": "string"
},
"type": "array",
"example": [
"การเงิน",
"รายรับ",
"รายจ่าย"
]
},
2023-12-12 12:01:56 +07:00
"title": {
"type": "string",
"example": "การเงิน"
},
"description": {
"type": "string",
"example": "การเงิน"
},
"category": {
"items": {
"type": "string"
},
"type": "array",
"example": [
"การเงิน",
"รายงาน"
]
},
2023-12-26 14:52:02 +07:00
"author": {
"type": "string",
"example": "นายก"
},
"metadata": {
"properties": {},
"additionalProperties": {},
"type": "object",
"example": {}
},
2023-12-12 12:01:56 +07:00
"from": {
"properties": {
"file": {
"type": "string",
"example": "ไฟล์ 1.xlsx"
},
"path": {
"items": {
"type": "string"
},
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2",
"แฟ้ม 3"
]
}
},
"required": [
"file",
"path"
],
"type": "object",
"description": "หากต้องการอัพโหลดไฟล์ด้วยให้ส่งค่าเป็นจริง"
},
"to": {
"properties": {
"file": {
"type": "string",
"example": "ไฟล์ 1 แก้ไข.xlsx"
},
"path": {
"items": {
"type": "string"
},
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2",
"แฟ้ม 3"
]
}
},
"required": [
"file",
"path"
],
"type": "object"
},
"upload": {
"type": "boolean",
"example": false
}
},
"required": [
"from"
],
"type": "object",
"additionalProperties": false
},
"DeleteFileBody": {
"properties": {
"path": {
"items": {
"type": "string"
},
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2",
"แฟ้ม 3"
]
},
"file": {
"type": "string",
"example": "ไฟล์ 1 แก้ไข.xlsx"
}
},
"required": [
"path",
"file"
],
"type": "object",
"additionalProperties": false
2023-12-14 11:03:35 +07:00
},
"DownloadFileBody": {
"properties": {
"path": {
"items": {
"type": "string"
},
"type": "array",
"example": [
"แฟ้ม 1",
"แฟ้ม 2",
"แฟ้ม 3"
]
},
"file": {
"type": "string",
"example": "ไฟล์ 1 แก้ไข.xlsx"
}
},
"required": [
"path",
"file"
],
"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": {
"/search": {
"post": {
"operationId": "SearchFile",
2023-11-17 09:03:31 +07:00
"responses": {
"200": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ",
2023-11-17 09:03:31 +07:00
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/StorageFile"
2023-11-17 09:03:31 +07:00
},
"type": "array"
}
}
}
}
},
"tags": [
"Search"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Search"
}
}
}
}
}
},
"/storage/list": {
"post": {
"operationId": "GetList",
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/StorageFolder"
},
"type": "array"
},
{
"items": {
"$ref": "#/components/schemas/StorageFile"
},
"type": "array"
}
]
2023-11-27 14:32:08 +07:00
},
"examples": {
"Example 1": {
"value": [
{
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/",
"name": "แฟ้ม 1",
2023-11-27 14:32:08 +07:00
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin"
},
{
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 2/",
"name": "แฟ้ม 2",
2023-11-27 14:32:08 +07:00
"createdAt": "2022-01-23T16:05:02.114Z",
"createdBy": "admin"
}
]
},
"Example 2": {
"value": [
{
"pathname": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/เอกสาร 1.pdf",
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/",
"title": "เอกสาร",
"description": "เอกสารการเงิน",
2023-12-26 14:52:02 +07:00
"author": "นายก",
"category": [
"บัญชี"
],
"keyword": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
],
"upload": false,
"hidden": false,
"fileName": "เอกสาร 1.pdf",
"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:32:08 +07:00
}
2023-11-17 09:03:31 +07:00
}
}
}
}
},
"summary": "แสดงรายการแฟ้มหรือไฟล์",
2023-11-17 09:03:31 +07:00
"tags": [
"Storage Folder",
"Storage File"
2023-11-17 09:03:31 +07:00
],
2023-11-27 09:45:30 +07:00
"security": [
{
"bearerAuth": []
}
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListRequestBody"
}
}
}
}
}
},
"/storage/folder": {
2023-11-17 09:03:31 +07:00
"post": {
"operationId": "PostFolder",
2023-11-17 09:03:31 +07:00
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
2023-11-17 09:03:31 +07:00
}
},
"summary": "สร้างแฟ้ม",
2023-11-17 09:03:31 +07:00
"tags": [
"Storage Folder"
2023-11-17 09:03:31 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"management-role",
"admin"
2023-11-27 09:45:30 +07:00
]
}
],
2023-11-17 09:03:31 +07:00
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FolderBody"
2023-11-17 09:03:31 +07:00
}
}
}
}
},
2023-11-17 09:03:31 +07:00
"put": {
"operationId": "MoveFolder",
2023-11-17 09:03:31 +07:00
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
2023-11-17 09:03:31 +07:00
}
},
2023-12-19 08:50:48 +07:00
"description": "ย้ายแฟ้มภายในตำแหน่งหนึ่งไปภายในอีกแฟ้มหนึ่ง\nหรือเปลี่ยนชื่อได้",
"summary": "ย้ายแฟ้ม",
2023-11-17 09:03:31 +07:00
"tags": [
"Storage Folder"
2023-11-17 09:03:31 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"management-role",
"admin"
2023-11-27 09:45:30 +07:00
]
}
],
"parameters": [],
2023-11-17 09:03:31 +07:00
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PutFolderBody"
2023-11-17 09:03:31 +07:00
}
}
}
}
},
"delete": {
"operationId": "DeleteStorage",
2023-11-17 09:03:31 +07:00
"responses": {
"204": {
2023-11-27 09:45:30 +07:00
"description": "สำเร็จ"
2023-11-17 09:03:31 +07:00
}
},
2023-12-19 08:50:48 +07:00
"description": "ลบแฟ้มออกจากระบบ",
"summary": "ลบแฟ้มออกจากระบบ",
2023-11-17 09:03:31 +07:00
"tags": [
"Storage Folder"
2023-11-17 09:03:31 +07:00
],
"security": [
{
2023-11-27 09:45:30 +07:00
"bearerAuth": [
"management-role",
"admin"
2023-11-27 09:45:30 +07:00
]
}
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteFolderBody"
}
}
2023-11-17 09:03:31 +07:00
}
}
2023-11-17 09:03:31 +07:00
}
},
"/storage/folder/size": {
"post": {
"operationId": "FolderSize",
2023-12-07 15:45:03 +07:00
"responses": {
"200": {
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"properties": {
"size": {
"type": "number",
"format": "double"
}
},
"required": [
"size"
],
"type": "object"
2023-11-27 16:07:32 +07:00
},
"examples": {
"Example 1": {
"value": {
"size": 10240
}
2023-11-27 16:07:32 +07:00
}
2023-11-17 09:03:31 +07:00
}
}
}
}
},
2023-12-19 08:50:48 +07:00
"summary": "ร้องขอขนาดของแฟ้ม มีหน่อยเป็นไบต์",
"tags": [
"Storage Folder"
],
"security": [
{
2024-01-12 11:08:01 +07:00
"bearerAuth": []
}
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FolderBody"
}
}
}
}
2023-12-07 15:45:03 +07:00
}
},
"/storage/file": {
2023-11-17 09:03:31 +07:00
"post": {
"operationId": "PostFile",
2023-11-17 09:03:31 +07:00
"responses": {
"200": {
2023-11-27 12:04:59 +07:00
"description": "สำเร็จ",
2023-11-27 09:45:30 +07:00
"content": {
"application/json": {
"schema": {
"properties": {
"createdBy": {
2023-11-22 14:45:56 +07:00
"type": "string"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
"updatedBy": {
"type": "string"
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"format": "date-time"
}
]
},
2023-12-15 10:08:06 +07:00
"hidden": {
"type": "boolean"
},
2023-11-27 09:45:30 +07:00
"upload": {
"type": "boolean"
},
"path": {
"type": "string"
},
2023-12-26 14:52:02 +07:00
"metadata": {
"$ref": "#/components/schemas/Record_string.any_"
},
"author": {
"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": {
2023-11-27 13:41:46 +07:00
"type": "string"
},
"fileSize": {
"type": "number",
"format": "double"
2023-11-27 13:41:46 +07:00
},
"fileName": {
2023-11-27 13:41:46 +07:00
"type": "string"
},
"pathname": {
2023-11-27 13:41:46 +07:00
"type": "string"
},
"uploadUrl": {
"type": "string"
2023-11-27 13:41:46 +07:00
}
},
"required": [
"createdBy",
"createdAt",
2023-11-27 13:41:46 +07:00
"updatedBy",
"updatedAt",
"hidden",
"upload",
"path",
2023-12-26 14:52:02 +07:00
"metadata",
"author",
"keyword",
"category",
"description",
"title",
"fileType",
"fileSize",
"fileName",
"pathname",
"uploadUrl"
2023-11-27 13:41:46 +07:00
],
"type": "object"
2023-12-01 10:55:36 +07:00
},
"examples": {
"Example 1": {
"value": {
"pathname": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/เอกสาร 1.pdf",
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/",
2023-12-01 10:55:36 +07:00
"title": "เอกสาร",
"description": "เอกสารการเงิน",
2023-12-26 14:52:02 +07:00
"author": "นายก",
2023-12-01 10:55:36 +07:00
"category": [
"บัญชี"
],
"keyword": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
],
"upload": false,
"hidden": false,
"fileName": "เอกสาร 1.pdf",
2023-12-01 10:55:36 +07:00
"fileSize": 10240,
"fileType": "application/pdf",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin",
"updatedAt": "2021-07-20T12:33:13.018Z",
"updatedBy": "admin",
"uploadUrl": "s3.storage.upload"
2023-12-01 10:55:36 +07:00
}
}
2023-11-27 13:41:46 +07:00
}
}
}
2023-11-20 15:54:19 +07:00
}
},
2023-12-19 08:50:48 +07:00
"description": "ร้องขอการอัปโหลดไฟล์ โดยเมื่อร้องขอจะได้ URL สำหรับอัพโหลดไฟล์มาพร้อมข้อมูลของไฟล์ที่จะทำการอัพโหลด",
"summary": "ร้องขอการอัปโหลดไฟล์",
2023-11-20 15:54:19 +07:00
"tags": [
"Storage File"
2023-11-20 15:54:19 +07:00
],
"security": [
{
2023-11-27 13:41:46 +07:00
"bearerAuth": [
"management-role",
"admin"
2023-11-27 13:41:46 +07:00
]
2023-11-20 15:54:19 +07:00
}
],
"parameters": [],
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": {
"$ref": "#/components/schemas/FileBody"
2023-11-20 15:54:19 +07:00
}
}
}
}
},
"put": {
"operationId": "MoveFile",
2023-11-20 15:54:19 +07:00
"responses": {
"200": {
2023-11-27 13:41:46 +07:00
"description": "สำเร็จ",
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"properties": {
"uploadUrl": {
2023-11-27 13:41:46 +07:00
"type": "string"
}
},
"required": [
"uploadUrl"
2023-11-27 13:41:46 +07:00
],
"type": "object"
}
]
},
"examples": {
"Example 1": {
"value": {
"uploadUrl": "s3.storage.upload"
}
}
2023-11-27 13:41:46 +07:00
}
}
}
},
"204": {
"description": "สำเร็จ"
2023-11-20 15:54:19 +07:00
}
},
2023-12-19 08:50:48 +07:00
"summary": "ย้ายไฟล์หรือเปลี่ยนชื่อไฟล์",
2023-11-20 15:54:19 +07:00
"tags": [
"Storage File"
2023-11-20 15:54:19 +07:00
],
"security": [
{
2023-11-27 13:41:46 +07:00
"bearerAuth": [
"management-role",
"admin"
2023-11-27 13:41:46 +07:00
]
2023-11-20 15:54:19 +07:00
}
],
"parameters": [],
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": {
"$ref": "#/components/schemas/PutFileBody"
2023-11-20 15:54:19 +07:00
}
}
}
}
},
"delete": {
"operationId": "DeleteFile",
"responses": {
"204": {
2023-11-27 13:41:46 +07:00
"description": "สำเร็จ"
2023-11-20 15:54:19 +07:00
}
},
2023-12-19 08:50:48 +07:00
"summary": "ลบไฟล์ออกจากระบบ",
2023-11-20 15:54:19 +07:00
"tags": [
"Storage File"
2023-11-20 15:54:19 +07:00
],
"security": [
{
2023-11-27 13:41:46 +07:00
"bearerAuth": [
"management-role",
"admin"
2023-11-27 13:41:46 +07:00
]
2023-11-20 15:54:19 +07:00
}
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteFileBody"
}
}
2023-11-20 15:54:19 +07:00
}
}
}
},
"/storage/file/download": {
"post": {
2023-11-22 14:45:56 +07:00
"operationId": "DownloadFile",
"responses": {
"200": {
"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-12-15 10:08:06 +07:00
"hidden": {
"type": "boolean"
},
2023-11-27 09:45:30 +07:00
"upload": {
"type": "boolean"
},
"path": {
"type": "string"
},
2023-12-26 14:52:02 +07:00
"metadata": {
"$ref": "#/components/schemas/Record_string.any_"
},
"author": {
"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"
},
"downloadUrl": {
2023-11-22 14:45:56 +07:00
"type": "string"
}
},
"required": [
"createdBy",
"createdAt",
"updatedBy",
"updatedAt",
2023-12-15 10:08:06 +07:00
"hidden",
2023-11-27 09:45:30 +07:00
"upload",
"path",
2023-12-26 14:52:02 +07:00
"metadata",
"author",
2023-11-22 14:45:56 +07:00
"keyword",
"category",
"description",
"title",
"fileType",
"fileSize",
"fileName",
"pathname",
"downloadUrl"
2023-11-22 14:45:56 +07:00
],
"type": "object"
},
"examples": {
"Example 1": {
"value": {
"pathname": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/เอกสาร 1.pdf",
"path": "ตู้เอกสาร 1/ลิ้นชัก 1/แฟ้ม 1/",
"title": "เอกสาร",
"description": "เอกสารการเงิน",
"category": [
"บัญชี"
],
"keyword": [
"เงิน",
"บัญชี",
"รายจ่าย",
"รายรับ"
],
2023-12-26 14:52:02 +07:00
"author": "นายก",
"upload": false,
"hidden": false,
"fileName": "เอกสาร 1.pdf",
"fileSize": 10240,
"fileType": "application/pdf",
"createdAt": "2021-07-20T12:33:13.018Z",
"createdBy": "admin",
"updatedAt": "2021-07-20T12:33:13.018Z",
"updatedBy": "admin",
"downloadUrl": "s3.storage.download"
}
}
2023-11-22 14:45:56 +07:00
}
}
}
}
},
2023-12-19 08:50:48 +07:00
"summary": "ขอข้อมูลการโหลดไฟล์",
2023-11-22 14:45:56 +07:00
"tags": [
"Download"
2023-11-27 14:06:51 +07:00
],
"security": [
{
"bearerAuth": [
"management-role",
"admin"
]
2023-11-27 14:06:51 +07:00
}
2023-11-22 14:45:56 +07:00
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DownloadFileBody"
2023-12-01 10:55:36 +07:00
}
2023-11-22 14:45:56 +07:00
}
}
}
2023-11-20 15:54:19 +07:00
}
2023-12-15 10:08:06 +07:00
},
"/version": {
"get": {
"operationId": "GetVersion",
"responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"tags": [
"Version"
],
"security": [],
"parameters": []
}
2023-11-17 09:03:31 +07:00
}
},
"servers": [
{
"url": "/api"
}
],
"basePath": "/api"
}