{"openapi":"3.0.3","info":{"version":"1.0.1","title":"2gether User Service API","description":"User Service API"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/2gether-dev/2gether-user-service/1.0.1"},{"url":"http://localhost:8080","description":"local server"},{"url":"http://user-service","description":"inner kubernate"},{"url":"https://apidev.2gether.global/api/user-service/","description":"development environment"},{"url":"https://api.2gether.global/api/user-service/","description":"production environment"}],"paths":{"/admin/info":{"get":{"summary":"return service info, only for health check","operationId":"admin-info","responses":{"200":{"description":"server info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInfo"}}}}}}},"/internal/users/financial/{user_id}":{"parameters":[{"in":"path","required":true,"name":"user_id","schema":{"type":"integer"}}],"get":{"summary":"return user financial data, only for role BACKOFFICE","responses":{"200":{"description":"User financial data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialData"}}}},"404":{"description":"Not found financial data for this user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"add/update user financial data, only for role BACKOFFICE","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialDataRequest"}}}},"responses":{"200":{"description":"Ok adding user financial data"},"400":{"description":"Not valid parameter adding financial data for this user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/users/financial":{"get":{"summary":"return user financial data, only for role USER","responses":{"200":{"description":"User financial data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialData"}}}},"404":{"description":"Not found financial data for this user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Update user to add more info, only for role USER","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialDataRequest"}}}},"responses":{"200":{"description":"User financial data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialData"}}}},"400":{"description":"Not valid parameter adding financial data for this user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"FinancialDataRequest":{"required":["employment_status","income","income_from","financial_use","profession"],"type":"object","properties":{"employment_status":{"type":"string","minLength":1},"income_from":{"type":"string","minLength":1},"income":{"type":"string","minLength":1},"financial_use":{"type":"string","minLength":1},"profession":{"type":"string"}}},"AdminInfo":{"properties":{"name":{"type":"string"}}},"FinancialData":{"properties":{"employment_status":{"type":"string"},"income_from":{"type":"string"},"income":{"type":"string"},"financial_use":{"type":"string"},"profession":{"type":"string"}}},"Error":{"properties":{"timestamp":{"type":"integer"},"path":{"type":"string"},"status":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string","enum":["NOT_FOUND","UNKNOWN_ERROR"]}}}}}}