-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswagger.json
More file actions
1 lines (1 loc) · 34.5 KB
/
swagger.json
File metadata and controls
1 lines (1 loc) · 34.5 KB
1
{"openapi":"3.0.1","info":{"title":"Lake API","license":{"name":"Apache 2.0","url":"http://springdoc.org"},"version":"1.5.8"},"servers":[{"url":"http://localhost:5000","description":"Generated server url"}],"paths":{"/api/acl/perm":{"get":{"tags":["ACL - Access Control"],"summary":"Get All Permissions","description":"This can only by done by Admin or File Owner.","operationId":"getAllPermission","parameters":[{"name":"user","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"group","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"file","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"folder","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/folders/{id}":{"get":{"tags":["Folder"],"summary":"Get a folder by ID","description":"This can only be done by users who has read permission for folders.","operationId":"getFolderById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Folder not found"}},"security":[{"bearer-key":[]}]},"put":{"tags":["Folder"],"summary":"Update a folder by ID","description":"Only name and parentId could be updated .This can only be done by users who has write permission for folders.","operationId":"updateFolder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"parentId","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["Folder"],"summary":"Delete a folder","description":"This can only be done by users who has write permission for folders.","operationId":"deleteFolderById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Folder not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Invalid folder ID supplied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}},"security":[{"bearer-key":[]}]}},"/api/folders":{"get":{"tags":["Folder"],"summary":"Get all folders","description":"This can only be done by users who has read permission for folders.","operationId":"getAllFolders","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Folder"}}}}}},"security":[{"bearer-key":[]}]},"post":{"tags":["Folder"],"summary":"Add a folder","description":"This can only be done by logged in user.","operationId":"createFolder","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"Status OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}},"security":[{"bearer-key":[]}]}},"/api/users/check_email":{"get":{"tags":["Users"],"summary":"Check if Email is available to use","description":"Check if Email is available to use","operationId":"email","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/auth/signin":{"post":{"tags":["User Authentication"],"summary":"Logs user into the system","operationId":"authenticateUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"400":{"description":"Invalid username/password supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/acl/folder/user/all":{"delete":{"tags":["ACL - Access Control"],"summary":"Remove ALL Folder Permission For User","description":"This can only by done by Admin or Folder Owner.","operationId":"removeAllFolderPermissionForUser","parameters":[{"name":"folderId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"}},"security":[{"bearer-key":[]}]}},"/api/acl/file/user":{"put":{"tags":["ACL - Access Control"],"summary":"Grant File Permission For User","description":"This can only by done by Admin or File Owner.","operationId":"grantFilePermissionForUser","parameters":[{"name":"fileId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"perm","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["ACL - Access Control"],"summary":"Remove a File Permission For User","description":"This can only by done by Admin or File Owner.","operationId":"removeFilePermissionForUser","parameters":[{"name":"fileId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"permStr","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/test/user":{"get":{"tags":["Internal - Debugging Tools"],"summary":"Has Role User","description":"This can only by done by User.","operationId":"userAccess","responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"bearer-key":[]}]}},"/api/auth/logout":{"get":{"tags":["User Authentication"],"summary":"Logout current user","description":"And delete Refresh Token in database.","operationId":"logoutUser","responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"bearer-key":[]}]}},"/api/users/find/{username}":{"get":{"tags":["Users"],"summary":"Get user by user name","description":"This can only be done by admin.","operationId":"getUserByUsername","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Invalid username supplied"}},"security":[{"bearer-key":[]}]}},"/api/files/data/{id}":{"get":{"tags":["File"],"summary":"Get File Data","description":"This can only be done by logged in user and those who have read permssions of file.","operationId":"getFileData","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"array","items":{"type":"string","format":"byte"}}}}}},"security":[{"bearer-key":[]}]}},"/api/acl/folder/group/all":{"delete":{"tags":["ACL - Access Control"],"summary":"Remove ALL Folder Permission For Group","description":"This can only by done by Admin or Folder Owner.","operationId":"removeAllFolderPermissionForGroup","parameters":[{"name":"folderId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"groupId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"}},"security":[{"bearer-key":[]}]}},"/api/groups/{name}/users":{"put":{"tags":["Groups"],"summary":"Add a user to a group","description":"This can only be done by admin.","operationId":"addMember","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemberRequest"}}}},"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"bearer-key":[]}]}},"/api/users":{"get":{"tags":["Users"],"summary":"Get a list of all users in the system","description":"This can only be done by admin.","operationId":"getAllUsers","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"perPage","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":"id,asc"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"security":[{"bearer-key":[]}]},"post":{"tags":["User Authentication"],"summary":"Create user","description":"Create user.","operationId":"registerUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}}},"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/files":{"get":{"tags":["File"],"summary":"Get all files","description":"This can only be done by logged in user with file permissions.","operationId":"getAllFiles","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/File"}}}}}},"security":[{"bearer-key":[]}]},"post":{"tags":["File"],"summary":"Upload a file","description":"This can only be done by logged in user having the file permissions.","operationId":"uploadFile","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"Status OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/groups":{"get":{"tags":["Groups"],"summary":"Get all groups","description":"This can only be done by logged in user.","operationId":"getAllGroups","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"perPage","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":"id,asc"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}}}},"security":[{"bearer-key":[]}]},"post":{"tags":["Groups"],"summary":"Add an user group","description":"This can only be done by admin.","operationId":"createGroup","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"Status OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Group"}}}}},"security":[{"bearer-key":[]}]}},"/api/groups/{id}":{"get":{"tags":["Groups"],"summary":"Get a group by ID","description":"This can only be done by logged in user.","operationId":"getGroupById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Group not found"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Group"}}}},"400":{"description":"Invalid ID supplied"}},"security":[{"bearer-key":[]}]},"put":{"tags":["Groups"],"summary":"Update a group name by ID","description":"This can only be done by admin.","operationId":"updateGroup","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"name","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Group"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["Groups"],"summary":"Delete a group","description":"This can only be done by admin.","operationId":"deleteGroupById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"400":{"description":"Invalid group ID supplied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Group"}}}},"404":{"description":"Group not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Group"}}}}},"security":[{"bearer-key":[]}]}},"/api/folders/{folderId}/subfolders/{subfolderId}":{"put":{"tags":["Folder"],"summary":"Add a subfolder name to folder","description":"This can only be done by users who has write permission for folders.","operationId":"addSubfolder","parameters":[{"name":"folderId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"subfolderId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}},"security":[{"bearer-key":[]}]}},"/api/users/{id}":{"get":{"tags":["Users"],"summary":"Get user by ID","description":"This can only be done by admin.","operationId":"getUserById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Invalid ID supplied"}},"security":[{"bearer-key":[]}]},"put":{"tags":["Users"],"summary":"Update user ","description":"This can only be done by the logged in user.","operationId":"updateUserById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["Users"],"summary":"Delete user","description":"This can only be done by admin.","operationId":"deleteUserById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"400":{"description":"Invalid user ID supplied","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}},"404":{"description":"User not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}},"security":[{"bearer-key":[]}]}},"/api/acl/folder/user":{"put":{"tags":["ACL - Access Control"],"summary":"Grant Folder Permission For User","description":"This can only by done by Admin or Folder Owner.","operationId":"grantFolderPermissionForUser","parameters":[{"name":"folderId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"perm","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"}},"security":[{"bearer-key":[]}]},"delete":{"tags":["ACL - Access Control"],"summary":"Remove a File Permission For User","description":"This can only by done by Admin or File Owner.","operationId":"removeFolderPermissionForUser","parameters":[{"name":"folderId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"permStr","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/test/all":{"get":{"tags":["Internal - Debugging Tools"],"summary":"Has Role User","description":"This can only by done by User.","operationId":"allAccess","responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/acl/file/group/all":{"delete":{"tags":["ACL - Access Control"],"summary":"Remove ALL File Permission For Group","description":"This can only by done by Admin or File Owner.","operationId":"removeAllFilePermissionForGroup","parameters":[{"name":"fileId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"groupId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/files/{id}":{"get":{"tags":["File"],"summary":"Get a file by ID","description":"This can only be done by logged in user.","operationId":"getFileById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"File not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]},"put":{"tags":["File"],"summary":"Update a file by ID","description":"This can only be done by user who has write permission to file.","operationId":"updateFile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["File"],"summary":"Delete a file by ID","description":"This can only be done by logged in user.","operationId":"deleteFileById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"File not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/test/admin":{"get":{"tags":["Internal - Debugging Tools"],"summary":"Has Role Admin","description":"This can only by done by Admin.","operationId":"adminAccess","responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"bearer-key":[]}]}},"/api/acl/folder/group":{"put":{"tags":["ACL - Access Control"],"summary":"Grant Folder Permission For Group","description":"This can only by done by Admin or Folder Owner.","operationId":"grantFolderPermissionForGroup","parameters":[{"name":"folderId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"groupId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"perm","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"}},"security":[{"bearer-key":[]}]},"delete":{"tags":["ACL - Access Control"],"summary":"Remove a Folder Permission For Group","description":"This can only by done by Admin or File Owner.","operationId":"removeFolderPermissionForGroup","parameters":[{"name":"folderId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"groupId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"permStr","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/folder/{folderId}/files":{"get":{"tags":["File"],"summary":"Get All Files by Folder Id","description":"This can only be done by logged in user and those who have read permssions of file.","operationId":"getAllFilesByFolderId","parameters":[{"name":"folderId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/File"}}}}}},"security":[{"bearer-key":[]}]}},"/api/acl/file/group":{"put":{"tags":["ACL - Access Control"],"summary":"Grant File Permission For Group","description":"This can only by done by Admin or File Owner.","operationId":"grantFilePermissionForGroup","parameters":[{"name":"fileId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"groupId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"perm","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["ACL - Access Control"],"summary":"Remove a File Permission For Group","description":"This can only by done by Admin or File Owner.","operationId":"removeFilePermissionForGroup","parameters":[{"name":"fileId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"groupId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"permStr","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/folders/{folderId}/files/{fileId}":{"put":{"tags":["Folder"],"summary":"Add a file to a folder","description":"This can only be done by user who has write permission to file.","operationId":"addFileToFolder","parameters":[{"name":"folderId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"default":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/users/my-profile":{"get":{"tags":["Users"],"summary":"Get the logged in's user profile","description":"This can only be done by the logged in user.","operationId":"getCurrentProfile","responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}},"security":[{"bearer-key":[]}]}},"/api/groups/find/{name}":{"get":{"tags":["Groups"],"summary":"Get a group by name","description":"This can only be done by logged in user.","operationId":"getGroupByName","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Group not found"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Group"}}}},"400":{"description":"Invalid name supplied"}},"security":[{"bearer-key":[]}]}},"/api/acl/file/user/all":{"delete":{"tags":["ACL - Access Control"],"summary":"Remove ALL File Permission For User","description":"This can only by done by Admin or File Owner.","operationId":"removeAllFilePermissionForUser","parameters":[{"name":"fileId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"userId","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"User not found"},"400":{"description":"Invalid ID supplied"},"200":{"description":"successful operation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/File"}}}}},"security":[{"bearer-key":[]}]}},"/api/auth/refresh-token":{"post":{"tags":["User Authentication"],"summary":"Refresh Token","description":"Refresh Token.","operationId":"refreshtoken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRefreshRequest"}}}},"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/users/check_username":{"get":{"tags":["Users"],"summary":"Check if Username is available to use","description":"Check if Username is available to use","operationId":"username","parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"417":{"description":"default response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"200":{"description":"default response","content":{"*/*":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"ErrorMessage":{"type":"object","properties":{"statusCode":{"type":"integer","format":"int32"},"timestamp":{"type":"string","format":"date-time"},"message":{"type":"string"},"description":{"type":"string"}}},"File":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"owner":{"$ref":"#/components/schemas/User"},"cid":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"source":{"type":"string"},"topics":{"type":"string"},"size":{"type":"integer","format":"int64"},"data":{"type":"array","items":{"type":"string","format":"byte"}}}},"Role":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string","enum":["ROLE_USER","ROLE_ADMIN"]}}},"User":{"required":["email","password","username"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"maxLength":20,"minLength":0,"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"department":{"type":"string"},"affiliation":{"type":"string"},"email":{"maxLength":50,"minLength":0,"type":"string"},"password":{"maxLength":120,"minLength":6,"type":"string"},"roles":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Folder":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"creator":{"$ref":"#/components/schemas/User"},"parentId":{"type":"integer","format":"int64"},"files":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/File"}},"cid":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","format":"int64"}}},"LoginRequest":{"required":["password","username"],"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}}},"AddMemberRequest":{"type":"object","properties":{"user":{"uniqueItems":true,"type":"array","items":{"type":"string"}}}},"SignupRequest":{"required":["email","password","username"],"type":"object","properties":{"username":{"maxLength":20,"minLength":3,"type":"string"},"email":{"maxLength":50,"minLength":0,"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"department":{"type":"string"},"affiliation":{"type":"string"},"role":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"password":{"maxLength":40,"minLength":6,"type":"string"}}},"Group":{"required":["name"],"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"name":{"maxLength":36,"minLength":0,"type":"string"},"users":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/User"}}}},"TokenRefreshRequest":{"required":["refreshToken"],"type":"object","properties":{"refreshToken":{"type":"string"}}}},"securitySchemes":{"bearer-key":{"type":"http","name":"bearer-key","scheme":"bearer","bearerFormat":"JWT"}}}}