openapi: 3.0.3 info: title: UserService API version: 0.0.1 paths: /sessions/complete-logout: post: operationId: CompleteLogout security: - bearerAuth: [ ] responses: "200": description: OK content: { } /sessions/login: post: operationId: Login security: - BasicAuth: [ ] responses: "200": description: OK content: { } "404": description: Not Found content: { } /sessions/logout: post: operationId: Logout security: - bearerAuth: [ ] responses: "200": description: OK content: { } /sessions/refresh: post: operationId: Refresh security: - bearerAuth: [ ] responses: "200": description: OK content: { } /sessions/verify: get: operationId: Verify security: - bearerAuth: [ ] responses: "200": description: OK content: { } /sessions: get: operationId: ListSessions security: - bearerAuth: [ ] responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ListSessionsResponse' /users: post: operationId: CreateUser security: - bearerAuth: [ ] requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateUserRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/CreateUserResponse' get: operationId: ListUsers parameters: - name: page in: query required: true schema: type: integer format: int32 - name: pageSize in: query required: true schema: type: integer format: int32 security: - bearerAuth: [ ] responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ListUsersResponse' /users/me: get: operationId: GetMe security: - bearerAuth: [ ] responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/GetUserResponse' /users/{id}: get: operationId: GetUser security: - bearerAuth: [ ] parameters: - name: id in: path required: true schema: type: integer format: int32 responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/GetUserResponse' delete: operationId: DeleteUser security: - bearerAuth: [ ] parameters: - name: id in: path required: true schema: type: integer format: int32 responses: "200": description: OK content: { } patch: operationId: UpdateUser security: - bearerAuth: [ ] parameters: - name: id in: path required: true schema: type: integer format: int32 requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateUserRequest' required: true responses: "200": description: OK content: { } components: schemas: CreateUserRequest: type: object required: - username - password properties: username: type: string password: type: string CreateUserResponse: type: object required: - id properties: id: type: integer format: int32 GetUserResponse: type: object required: - user properties: user: $ref: '#/components/schemas/User' UpdateUserRequest: type: object properties: username: type: string role: type: integer format: int32 User: type: object required: - id - username - createdAt - modifiedAt - role properties: id: type: integer format: int32 username: type: string createdAt: type: string format: date-time modifiedAt: type: string format: date-time role: type: integer format: int32 Session: type: object required: - id - userId - role - createdAt - expiresAt - userAgent - ip properties: id: type: string userId: type: integer format: int32 role: type: integer format: int32 createdAt: type: string format: date-time expiresAt: type: string format: date-time userAgent: type: string ip: type: string ListSessionsResponse: type: object required: - sessions properties: sessions: type: array items: $ref: '#/components/schemas/Session' ListUsersResponse: type: object required: - users - page - max_page properties: users: type: array items: $ref: '#/components/schemas/User' page: type: integer format: int32 max_page: type: integer format: int32 securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT BasicAuth: type: http scheme: basic