{"openapi":"3.0.0","paths":{"/users":{"post":{"operationId":"UsersController_create","summary":"Create a user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"204":{"description":""}},"tags":["User management"]},"get":{"operationId":"UsersController_getAll","summary":"Get list of users","parameters":[{"name":"limit","required":true,"in":"query","description":"Limit","schema":{"minimum":1,"format":"int32","default":200000,"example":200000,"type":"integer"}},{"name":"offset","required":true,"in":"query","description":"Offset","schema":{"minimum":0,"format":"int32","default":0,"example":0,"type":"integer"}},{"name":"sort","required":false,"in":"query","description":"Sort Column","schema":{"default":"login","type":"string"}},{"name":"order","required":false,"in":"query","description":"Sorting. Direction. \"ASC\" - direct, \"DESC\" - reverse.","schema":{"default":"ASC","enum":["ASC","DESC"],"type":"string"}},{"name":"search","required":false,"in":"query","description":"Search string. Search by first name, last name, email and login","schema":{"example":"","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserList"}}}}},"tags":["User management"]}},"/users/{login}":{"put":{"operationId":"UsersController_update","summary":"Change user","parameters":[{"name":"login","required":true,"in":"path","description":"Login","schema":{"example":"admin","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"204":{"description":""}},"tags":["User management"]},"delete":{"operationId":"UsersController_delete","summary":"Delete user","parameters":[{"name":"login","required":true,"in":"path","description":"Login","schema":{"example":"admin","type":"string"}}],"responses":{"204":{"description":""}},"tags":["User management"]},"get":{"operationId":"UsersController_getUserInfo","summary":"Get user info","parameters":[{"name":"login","required":true,"in":"path","description":"Login","schema":{"example":"admin","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserItem"}}}}},"tags":["User management"]}},"/users/register":{"post":{"operationId":"UsersController_register","summary":"Register a new user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterUser"}}}},"responses":{"204":{"description":""}},"tags":["User management"]}},"/auth/login":{"post":{"operationId":"AuthController_login","summary":"Log in (access token is installed in the cookie server!!!)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginParams"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JWT_Refresh"}}}}},"tags":["Authorization"]}},"/auth/logout":{"post":{"operationId":"AuthController_logout","summary":"Log out","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutParams"}}}},"responses":{"204":{"description":""}},"tags":["Authorization"]}},"/auth/refresh":{"post":{"operationId":"AuthController_refresh","summary":"Get a new access token","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JWT_Refresh"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JWT_Refresh"}}}}},"tags":["Authorization"]}},"/auth":{"get":{"operationId":"AuthController_whoAmi","summary":"Get information about the user using an access token","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserItem"}}}}},"tags":["Authorization"]}}},"info":{"title":"Authority service openApi","description":"API Docs","version":"0.0.1","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"UserCreate":{"type":"object","properties":{"login":{"type":"string","example":"admin","description":"Login"},"firstName":{"type":"string","example":"Ivan","description":"First name"},"lastName":{"type":"string","example":"Ivanov","description":"Last name"},"email":{"type":"string","example":"example@gmail.com","description":"Mail"},"role":{"type":"string","example":"admin","description":"Role","enum":["admin","operator","guest"]},"locked":{"type":"integer","example":0,"description":"Locked - 1/unlocked - 0","format":"int32"},"password":{"type":"string","example":"384633ad37a18b3b4fc5bf3e371d6e9f","description":"Password + login in md5"}},"required":["login","firstName","lastName","email","role","locked","password"]},"UserUpdate":{"type":"object","properties":{"firstName":{"type":"string","example":"Ivan","description":"First name"},"lastName":{"type":"string","example":"Ivanov","description":"Last name"},"email":{"type":"string","example":"example@gmail.com","description":"Mail"},"role":{"type":"string","example":"admin","description":"Role","enum":["admin","operator","guest"]},"locked":{"type":"integer","example":0,"description":"Locked - 1/unlocked - 0","format":"int32"},"password":{"type":"string","example":"384633ad37a18b3b4fc5bf3e371d6e9f","description":"Password + login in md5"}}},"UserItem":{"type":"object","properties":{"login":{"type":"string","example":"admin","description":"Login"},"firstName":{"type":"string","example":"Ivan","description":"First name"},"lastName":{"type":"string","example":"Ivanov","description":"Last name"},"email":{"type":"string","example":"example@gmail.com","description":"Mail"},"role":{"type":"string","example":"admin","description":"Role","enum":["admin","operator","guest"]},"locked":{"type":"integer","example":0,"description":"Locked - 1/unlocked - 0","format":"int32"},"createdAt":{"format":"date-time","type":"string","description":"Creation time"},"updatedAt":{"format":"date-time","type":"string","description":"Update time"}},"required":["login","firstName","lastName","email","role","locked"]},"UserList":{"type":"object","properties":{"items":{"example":[],"description":"User list","type":"array","items":{"$ref":"#/components/schemas/UserItem"}},"count":{"type":"integer","example":0,"description":"Total users match the filter","format":"int32"}},"required":["items","count"]},"RegisterUser":{"type":"object","properties":{"login":{"type":"string","example":"admin","description":"Login"},"firstName":{"type":"string","example":"Ivan","description":"First name"},"lastName":{"type":"string","example":"Ivanov","description":"Last name"},"email":{"type":"string","example":"example@gmail.com","description":"Mail"},"password":{"type":"string","example":"384633ad37a18b3b4fc5bf3e371d6e9f","description":"Password + login in md5"}},"required":["login","firstName","lastName","email","password"]},"LoginParams":{"type":"object","properties":{"login":{"type":"string","example":"admin","description":"Login"},"sessionId":{"type":"string","example":"-","default":"-","description":"Session ID"},"password":{"type":"string","example":"2CSU8F1pF7oC96qilonMtES7c/IDgIdssF0fN1N7eJI=","description":"Password + login in md5 (in the example login - admin password - 12345678 md5sum(admin12345678))"}},"required":["login","password"]},"JWT_Refresh":{"type":"object","properties":{"refreshToken":{"type":"string","description":"Refresh token"}},"required":["refreshToken"]},"LogoutParams":{"type":"object","properties":{"login":{"type":"string","example":"admin","description":"Login"},"sessionId":{"type":"string","example":"-","default":"-","description":"Session ID"}},"required":["login"]}}}}