-
Notifications
You must be signed in to change notification settings - Fork 8
/
api-docs.json
1 lines (1 loc) · 4.62 KB
/
api-docs.json
1
{"openapi":"3.0.1","info":{"title":"Bookmark-API","version":"1"},"servers":[{"url":"http://localhost:9090","description":"Generated server url"}],"security":[{"basicAuth":[]}],"paths":{"/api/users":{"get":{"tags":["User-API"],"summary":"Retrieves list of users","operationId":"findAllUsers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}},"post":{"tags":["User-API"],"summary":"Register new user","operationId":"registerUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/users/{userid}/changepassword":{"post":{"tags":["User-API"],"summary":"Change current password of user","operationId":"changePassword","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/bookmarks":{"get":{"tags":["Bookmark-API"],"summary":"Retrieves list of bookmarks for given user","operationId":"findAllBookmarks","parameters":[{"name":"userid","in":"query","description":"The identifier of the user","required":true,"schema":{"type":"string"},"example":"c9caa4d1-5ad7-4dd1-8bd1-91b8bc5b9a48"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}},"post":{"tags":["Bookmark-API"],"summary":"Creates a new bookmark for given user","operationId":"createBookmark","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bookmark"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Bookmark"}}}}}}},"/api/bookmarks/upload":{"post":{"tags":["Bookmark-API"],"summary":"Uploads bookmarks inside an excel sheet","operationId":"uploadBookmarks","requestBody":{"content":{"application/json":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}}},"/api/users/{userid}":{"get":{"tags":["User-API"],"summary":"Get user specified by identifier","operationId":"getUser","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}},"delete":{"tags":["User-API"],"summary":"Delete user specified by identifier","operationId":"deleteUser","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}},"/api/users/me":{"get":{"tags":["User-API"],"summary":"Get current authenticated user","operationId":"currentUser","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/bookmarks/search":{"get":{"tags":["Bookmark-API"],"summary":"Searches bookmarks by name","operationId":"searchBookmarks","parameters":[{"name":"name","in":"query","description":"The name of the bookmarks to be searched for","required":true,"schema":{"type":"string"},"example":"Ama"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}}},"/api/bookmarks/{bookmarkId}":{"delete":{"tags":["Bookmark-API"],"summary":"Deletes an existing bookmark by its identifier","operationId":"deleteBookmark","parameters":[{"name":"bookmarkId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"identifier":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"password":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"username":{"type":"string"}}},"ChangePasswordRequest":{"type":"object","properties":{"oldPassword":{"type":"string"},"newPassword":{"type":"string"}}},"Bookmark":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"url":{"type":"string"},"userIdentifier":{"type":"string"}}}},"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}}}