chore: update generated route and swagger

This commit is contained in:
Methapon2001 2023-11-17 14:44:30 +07:00
parent 9cb38ba9f6
commit c3c7a0ad27
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
2 changed files with 188 additions and 162 deletions

View file

@ -5,6 +5,8 @@ import { Controller, ValidationService, FieldErrors, ValidateError, TsoaRoute, H
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
import { CabinetController } from './controllers/cabinetController'; import { CabinetController } from './controllers/cabinetController';
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
import { DrawerController } from './controllers/drawerController';
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
import { FileController } from './controllers/fileController'; import { FileController } from './controllers/fileController';
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
import { FolderController } from './controllers/folderController'; import { FolderController } from './controllers/folderController';
@ -64,7 +66,6 @@ export function RegisterRoutes(app: Router) {
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.post('/cabinet', app.post('/cabinet',
authenticateMiddleware([{"bearerAuth":[]}]),
...(fetchMiddlewares<RequestHandler>(CabinetController)), ...(fetchMiddlewares<RequestHandler>(CabinetController)),
...(fetchMiddlewares<RequestHandler>(CabinetController.prototype.createCabinet)), ...(fetchMiddlewares<RequestHandler>(CabinetController.prototype.createCabinet)),
@ -141,10 +142,10 @@ export function RegisterRoutes(app: Router) {
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/cabinet/:cabinetName/drawer', app.get('/cabinet/:cabinetName/drawer',
...(fetchMiddlewares<RequestHandler>(CabinetController)), ...(fetchMiddlewares<RequestHandler>(DrawerController)),
...(fetchMiddlewares<RequestHandler>(CabinetController.prototype.listDrawer)), ...(fetchMiddlewares<RequestHandler>(DrawerController.prototype.listDrawer)),
function CabinetController_listDrawer(request: any, response: any, next: any) { function DrawerController_listDrawer(request: any, response: any, next: any) {
const args = { const args = {
cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"}, cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
}; };
@ -155,7 +156,7 @@ export function RegisterRoutes(app: Router) {
try { try {
validatedArgs = getValidatedArgs(args, request, response); validatedArgs = getValidatedArgs(args, request, response);
const controller = new CabinetController(); const controller = new DrawerController();
const promise = controller.listDrawer.apply(controller, validatedArgs as any); const promise = controller.listDrawer.apply(controller, validatedArgs as any);
@ -166,10 +167,10 @@ export function RegisterRoutes(app: Router) {
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.post('/cabinet/:cabinetName/drawer', app.post('/cabinet/:cabinetName/drawer',
...(fetchMiddlewares<RequestHandler>(CabinetController)), ...(fetchMiddlewares<RequestHandler>(DrawerController)),
...(fetchMiddlewares<RequestHandler>(CabinetController.prototype.createDrawer)), ...(fetchMiddlewares<RequestHandler>(DrawerController.prototype.createDrawer)),
function CabinetController_createDrawer(request: any, response: any, next: any) { function DrawerController_createDrawer(request: any, response: any, next: any) {
const args = { const args = {
cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"}, cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"name":{"dataType":"string","required":true}}}, body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"name":{"dataType":"string","required":true}}},
@ -181,21 +182,21 @@ export function RegisterRoutes(app: Router) {
try { try {
validatedArgs = getValidatedArgs(args, request, response); validatedArgs = getValidatedArgs(args, request, response);
const controller = new CabinetController(); const controller = new DrawerController();
const promise = controller.createDrawer.apply(controller, validatedArgs as any); const promise = controller.createDrawer.apply(controller, validatedArgs as any);
promiseHandler(controller, promise, response, 204, next); promiseHandler(controller, promise, response, 201, next);
} catch (err) { } catch (err) {
return next(err); return next(err);
} }
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.put('/cabinet/:cabinetName/drawer/:drawerName', app.put('/cabinet/:cabinetName/drawer/:drawerName',
...(fetchMiddlewares<RequestHandler>(CabinetController)), ...(fetchMiddlewares<RequestHandler>(DrawerController)),
...(fetchMiddlewares<RequestHandler>(CabinetController.prototype.editDrawer)), ...(fetchMiddlewares<RequestHandler>(DrawerController.prototype.editDrawer)),
function CabinetController_editDrawer(request: any, response: any, next: any) { function DrawerController_editDrawer(request: any, response: any, next: any) {
const args = { const args = {
cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"}, cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"}, drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"},
@ -208,7 +209,7 @@ export function RegisterRoutes(app: Router) {
try { try {
validatedArgs = getValidatedArgs(args, request, response); validatedArgs = getValidatedArgs(args, request, response);
const controller = new CabinetController(); const controller = new DrawerController();
const promise = controller.editDrawer.apply(controller, validatedArgs as any); const promise = controller.editDrawer.apply(controller, validatedArgs as any);
@ -219,10 +220,10 @@ export function RegisterRoutes(app: Router) {
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.delete('/cabinet/:cabinetName/drawer/:drawerName', app.delete('/cabinet/:cabinetName/drawer/:drawerName',
...(fetchMiddlewares<RequestHandler>(CabinetController)), ...(fetchMiddlewares<RequestHandler>(DrawerController)),
...(fetchMiddlewares<RequestHandler>(CabinetController.prototype.deleteDrawer)), ...(fetchMiddlewares<RequestHandler>(DrawerController.prototype.deleteDrawer)),
function CabinetController_deleteDrawer(request: any, response: any, next: any) { function DrawerController_deleteDrawer(request: any, response: any, next: any) {
const args = { const args = {
cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"}, cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"}, drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"},
@ -234,17 +235,17 @@ export function RegisterRoutes(app: Router) {
try { try {
validatedArgs = getValidatedArgs(args, request, response); validatedArgs = getValidatedArgs(args, request, response);
const controller = new CabinetController(); const controller = new DrawerController();
const promise = controller.deleteDrawer.apply(controller, validatedArgs as any); const promise = controller.deleteDrawer.apply(controller, validatedArgs as any);
promiseHandler(controller, promise, response, 200, next); promiseHandler(controller, promise, response, 204, next);
} catch (err) { } catch (err) {
return next(err); return next(err);
} }
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.post('/file', app.post('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName',
upload.single('file'), upload.single('file'),
...(fetchMiddlewares<RequestHandler>(FileController)), ...(fetchMiddlewares<RequestHandler>(FileController)),
...(fetchMiddlewares<RequestHandler>(FileController.prototype.uploadFile)), ...(fetchMiddlewares<RequestHandler>(FileController.prototype.uploadFile)),
@ -253,6 +254,9 @@ export function RegisterRoutes(app: Router) {
const args = { const args = {
file: {"in":"formData","name":"file","required":true,"dataType":"file"}, file: {"in":"formData","name":"file","required":true,"dataType":"file"},
desc: {"in":"formData","name":"desc","required":true,"dataType":"string"}, desc: {"in":"formData","name":"desc","required":true,"dataType":"string"},
cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"},
folderName: {"in":"path","name":"folderName","required":true,"dataType":"string"},
}; };
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
@ -265,21 +269,20 @@ export function RegisterRoutes(app: Router) {
const promise = controller.uploadFile.apply(controller, validatedArgs as any); const promise = controller.uploadFile.apply(controller, validatedArgs as any);
promiseHandler(controller, promise, response, undefined, next); promiseHandler(controller, promise, response, 204, next);
} catch (err) { } catch (err) {
return next(err); return next(err);
} }
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/folder', app.get('/cabinet/:cabinetName/drawer/:drawerName/folder',
...(fetchMiddlewares<RequestHandler>(FolderController)), ...(fetchMiddlewares<RequestHandler>(FolderController)),
...(fetchMiddlewares<RequestHandler>(FolderController.prototype.listFolder)), ...(fetchMiddlewares<RequestHandler>(FolderController.prototype.listFolder)),
function FolderController_listFolder(request: any, response: any, next: any) { function FolderController_listFolder(request: any, response: any, next: any) {
const args = { const args = {
cabinet: {"in":"query","name":"cabinet","required":true,"dataType":"string"}, cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
drawer: {"in":"query","name":"drawer","required":true,"dataType":"string"}, drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"},
path: {"in":"query","name":"path","dataType":"string"},
}; };
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
@ -298,16 +301,15 @@ export function RegisterRoutes(app: Router) {
} }
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.post('/folder', app.post('/cabinet/:cabinetName/drawer/:drawerName/folder',
...(fetchMiddlewares<RequestHandler>(FolderController)), ...(fetchMiddlewares<RequestHandler>(FolderController)),
...(fetchMiddlewares<RequestHandler>(FolderController.prototype.createFolder)), ...(fetchMiddlewares<RequestHandler>(FolderController.prototype.createFolder)),
function FolderController_createFolder(request: any, response: any, next: any) { function FolderController_createFolder(request: any, response: any, next: any) {
const args = { const args = {
body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"name":{"dataType":"string","required":true}}}, body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"name":{"dataType":"string","required":true}}},
cabinet: {"in":"query","name":"cabinet","required":true,"dataType":"string"}, cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
drawer: {"in":"query","name":"drawer","required":true,"dataType":"string"}, drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"},
path: {"in":"query","name":"path","dataType":"string"},
}; };
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
@ -326,16 +328,16 @@ export function RegisterRoutes(app: Router) {
} }
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.put('/folder', app.put('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName',
...(fetchMiddlewares<RequestHandler>(FolderController)), ...(fetchMiddlewares<RequestHandler>(FolderController)),
...(fetchMiddlewares<RequestHandler>(FolderController.prototype.editFolder)), ...(fetchMiddlewares<RequestHandler>(FolderController.prototype.editFolder)),
function FolderController_editFolder(request: any, response: any, next: any) { function FolderController_editFolder(request: any, response: any, next: any) {
const args = { const args = {
body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"name":{"dataType":"string","required":true}}}, body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"name":{"dataType":"string","required":true}}},
cabinet: {"in":"query","name":"cabinet","required":true,"dataType":"string"}, cabinetName: {"in":"query","name":"cabinetName","required":true,"dataType":"string"},
drawer: {"in":"query","name":"drawer","required":true,"dataType":"string"}, drawerName: {"in":"query","name":"drawerName","required":true,"dataType":"string"},
path: {"in":"query","name":"path","required":true,"dataType":"string"}, folderName: {"in":"query","name":"folderName","required":true,"dataType":"string"},
}; };
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
@ -354,68 +356,36 @@ export function RegisterRoutes(app: Router) {
} }
}); });
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.delete('/cabinet/:cabinetName/drawer/:drawerName/folder/:folderName',
...(fetchMiddlewares<RequestHandler>(FolderController)),
...(fetchMiddlewares<RequestHandler>(FolderController.prototype.deleteFolder)),
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa function FolderController_deleteFolder(request: any, response: any, next: any) {
const args = {
cabinetName: {"in":"path","name":"cabinetName","required":true,"dataType":"string"},
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa drawerName: {"in":"path","name":"drawerName","required":true,"dataType":"string"},
folderName: {"in":"path","name":"folderName","required":true,"dataType":"string"},
function authenticateMiddleware(security: TsoaRoute.Security[] = []) {
return async function runAuthenticationMiddleware(request: any, _response: any, next: any) {
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
// keep track of failed auth attempts so we can hand back the most
// recent one. This behavior was previously existing so preserving it
// here
const failedAttempts: any[] = [];
const pushAndRethrow = (error: any) => {
failedAttempts.push(error);
throw error;
}; };
const secMethodOrPromises: Promise<any>[] = [];
for (const secMethod of security) {
if (Object.keys(secMethod).length > 1) {
const secMethodAndPromises: Promise<any>[] = [];
for (const name in secMethod) {
secMethodAndPromises.push(
expressAuthentication(request, name, secMethod[name])
.catch(pushAndRethrow)
);
}
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
secMethodOrPromises.push(Promise.all(secMethodAndPromises)
.then(users => { return users[0]; }));
} else {
for (const name in secMethod) {
secMethodOrPromises.push(
expressAuthentication(request, name, secMethod[name])
.catch(pushAndRethrow)
);
}
}
}
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
let validatedArgs: any[] = [];
try { try {
request['user'] = await promiseAny.call(Promise, secMethodOrPromises); validatedArgs = getValidatedArgs(args, request, response);
next();
} const controller = new FolderController();
catch(err) {
// Show most recent error as response
const error = failedAttempts.pop(); const promise = controller.deleteFolder.apply(controller, validatedArgs as any);
error.status = error.status || 401; promiseHandler(controller, promise, response, 204, next);
next(error); } catch (err) {
} return next(err);
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
}
}
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa

View file

@ -101,11 +101,7 @@
"tags": [ "tags": [
"Cabinet" "Cabinet"
], ],
"security": [ "security": [],
{
"bearerAuth": []
}
],
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"required": true, "required": true,
@ -232,7 +228,7 @@
"post": { "post": {
"operationId": "CreateDrawer", "operationId": "CreateDrawer",
"responses": { "responses": {
"204": { "201": {
"description": "" "description": ""
} }
}, },
@ -275,7 +271,7 @@
"operationId": "EditDrawer", "operationId": "EditDrawer",
"responses": { "responses": {
"204": { "204": {
"description": "Success" "description": ""
} }
}, },
"tags": [ "tags": [
@ -322,7 +318,7 @@
"delete": { "delete": {
"operationId": "DeleteDrawer", "operationId": "DeleteDrawer",
"responses": { "responses": {
"200": { "204": {
"description": "", "description": "",
"content": { "content": {
"application/json": { "application/json": {
@ -355,16 +351,44 @@
] ]
} }
}, },
"/file": { "/cabinet/{cabinetName}/drawer/{drawerName}/folder/{folderName}": {
"post": { "post": {
"operationId": "UploadFile", "operationId": "UploadFile",
"responses": { "responses": {
"204": { "204": {
"description": "No content" "description": ""
} }
}, },
"tags": [
"File"
],
"security": [], "security": [],
"parameters": [], "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": { "requestBody": {
"required": true, "required": true,
"content": { "content": {
@ -388,22 +412,15 @@
} }
} }
} }
} },
}, "put": {
"/folder": { "operationId": "EditFolder",
"get": {
"operationId": "ListFolder",
"responses": { "responses": {
"200": { "204": {
"description": "List of folder under drawer or under subfolder", "description": "",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {}
"items": {
"$ref": "#/components/schemas/EhrFolder"
},
"type": "array"
}
} }
} }
} }
@ -415,7 +432,7 @@
"parameters": [ "parameters": [
{ {
"in": "query", "in": "query",
"name": "cabinet", "name": "cabinetName",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "string"
@ -423,7 +440,7 @@
}, },
{ {
"in": "query", "in": "query",
"name": "drawer", "name": "drawerName",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "string"
@ -431,49 +448,11 @@
}, },
{ {
"in": "query", "in": "query",
"name": "path", "name": "folderName",
"required": false,
"schema": {
"type": "string"
}
}
]
},
"post": {
"operationId": "CreateFolder",
"responses": {
"201": {
"description": "Folder created."
}
},
"tags": [
"Folder"
],
"security": [],
"parameters": [
{
"in": "query",
"name": "cabinet",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "string"
} }
},
{
"in": "query",
"name": "drawer",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "path",
"required": false,
"schema": {
"type": "string"
}
} }
], ],
"requestBody": { "requestBody": {
@ -495,11 +474,16 @@
} }
} }
}, },
"put": { "delete": {
"operationId": "EditFolder", "operationId": "DeleteFolder",
"responses": { "responses": {
"204": { "204": {
"description": "Folder name changed." "description": "",
"content": {
"application/json": {
"schema": {}
}
}
} }
}, },
"tags": [ "tags": [
@ -508,24 +492,96 @@
"security": [], "security": [],
"parameters": [ "parameters": [
{ {
"in": "query", "in": "path",
"name": "cabinet", "name": "cabinetName",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "string"
} }
}, },
{ {
"in": "query", "in": "path",
"name": "drawer", "name": "drawerName",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "string"
} }
}, },
{ {
"in": "query", "in": "path",
"name": "path", "name": "folderName",
"required": true,
"schema": {
"type": "string"
}
}
]
}
},
"/cabinet/{cabinetName}/drawer/{drawerName}/folder": {
"get": {
"operationId": "ListFolder",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/EhrFolder"
},
"type": "array"
}
}
}
}
},
"tags": [
"Folder"
],
"security": [],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"post": {
"operationId": "CreateFolder",
"responses": {
"201": {
"description": ""
}
},
"tags": [
"Folder"
],
"security": [],
"parameters": [
{
"in": "path",
"name": "cabinetName",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "drawerName",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "string"