refactor(user,session): refactor api

This commit is contained in:
Vyacheslav1557 2025-03-28 16:59:36 +05:00
parent 5c14d329bd
commit 564f3fe0c9

View file

@ -90,12 +90,14 @@ paths:
schema:
type: integer
format: int32
example: 1
- name: pageSize
in: query
required: true
schema:
type: integer
format: int32
example: 20
security:
- bearerAuth: [ ]
responses:
@ -117,6 +119,7 @@ paths:
schema:
type: integer
format: int32
example: 2
responses:
"200":
description: OK
@ -135,6 +138,7 @@ paths:
schema:
type: integer
format: int32
example: 3
responses:
"200":
description: OK
@ -150,6 +154,7 @@ paths:
schema:
type: integer
format: int32
example: 3
requestBody:
content:
application/json:
@ -171,9 +176,11 @@ components:
page:
type: integer
format: int32
example: 1
total:
type: integer
format: int32
example: 10
CreateUserRequest:
type: object
required:
@ -182,8 +189,10 @@ components:
properties:
username:
type: string
example: user123
password:
type: string
example: password123
CreateUserResponse:
type: object
required:
@ -192,6 +201,7 @@ components:
id:
type: integer
format: int32
example: 13
GetUserResponse:
type: object
required:
@ -204,9 +214,11 @@ components:
properties:
username:
type: string
example: user123
role:
type: integer
format: int32
example: 1
User:
type: object
required:
@ -219,8 +231,10 @@ components:
id:
type: integer
format: int32
example: 13
username:
type: string
example: user123
createdAt:
type: string
format: date-time
@ -230,6 +244,7 @@ components:
role:
type: integer
format: int32
example: 1
Session:
type: object
required:
@ -246,9 +261,11 @@ components:
userId:
type: integer
format: int32
example: 13
role:
type: integer
format: int32
example: 1
createdAt:
type: string
format: date-time
@ -257,8 +274,10 @@ components:
format: date-time
userAgent:
type: string
example: Mozilla/5.0
ip:
type: string
example: 154.23.50.1
ListSessionsResponse:
type: object
required: