feat: merge auth&tester
This commit is contained in:
parent
89b4b19ae3
commit
a0e07aab66
1 changed files with 279 additions and 8 deletions
|
@ -218,7 +218,7 @@ paths:
|
||||||
description: OK
|
description: OK
|
||||||
/tasks:
|
/tasks:
|
||||||
post:
|
post:
|
||||||
operationId: AddTask
|
operationId: CreateTask
|
||||||
security:
|
security:
|
||||||
- bearerAuth: [ ]
|
- bearerAuth: [ ]
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -242,7 +242,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/AddTaskResponse'
|
$ref: '#/components/schemas/CreateTaskResponse'
|
||||||
/tasks/{id}:
|
/tasks/{id}:
|
||||||
get:
|
get:
|
||||||
operationId: GetTask
|
operationId: GetTask
|
||||||
|
@ -313,7 +313,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ListParticipantsResponse'
|
$ref: '#/components/schemas/ListParticipantsResponse'
|
||||||
post:
|
post:
|
||||||
operationId: AddParticipant
|
operationId: CreateParticipant
|
||||||
security:
|
security:
|
||||||
- bearerAuth: [ ]
|
- bearerAuth: [ ]
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -337,7 +337,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/AddParticipantResponse'
|
$ref: '#/components/schemas/CreateParticipantResponse'
|
||||||
delete:
|
delete:
|
||||||
operationId: DeleteParticipant
|
operationId: DeleteParticipant
|
||||||
security:
|
security:
|
||||||
|
@ -509,6 +509,159 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/GetMonitorResponse'
|
$ref: '#/components/schemas/GetMonitorResponse'
|
||||||
|
/auth/terminate:
|
||||||
|
post:
|
||||||
|
operationId: Terminate
|
||||||
|
security:
|
||||||
|
- bearerAuth: [ ]
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content: { }
|
||||||
|
/auth/login:
|
||||||
|
post:
|
||||||
|
operationId: Login
|
||||||
|
security:
|
||||||
|
- BasicAuth: [ ]
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content: { }
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
content: { }
|
||||||
|
/auth/logout:
|
||||||
|
post:
|
||||||
|
operationId: Logout
|
||||||
|
security:
|
||||||
|
- bearerAuth: [ ]
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content: { }
|
||||||
|
/auth/refresh:
|
||||||
|
post:
|
||||||
|
operationId: Refresh
|
||||||
|
security:
|
||||||
|
- bearerAuth: [ ]
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content: { }
|
||||||
|
/auth/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
|
||||||
|
example: 1
|
||||||
|
- name: pageSize
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 20
|
||||||
|
security:
|
||||||
|
- bearerAuth: [ ]
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListUsersResponse'
|
||||||
|
/users/{id}:
|
||||||
|
get:
|
||||||
|
operationId: GetUser
|
||||||
|
security:
|
||||||
|
- bearerAuth: [ ]
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 2
|
||||||
|
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
|
||||||
|
example: 3
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content: { }
|
||||||
|
patch:
|
||||||
|
operationId: UpdateUser
|
||||||
|
security:
|
||||||
|
- bearerAuth: [ ]
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 3
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/UpdateUserRequest'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content: { }
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Pagination:
|
Pagination:
|
||||||
|
@ -775,8 +928,8 @@ components:
|
||||||
task:
|
task:
|
||||||
$ref: '#/components/schemas/TasksListItem'
|
$ref: '#/components/schemas/TasksListItem'
|
||||||
solution:
|
solution:
|
||||||
$ref: '#/components/schemas/Solution'
|
$ref: '#/components/schemas/SolutionsListItem'
|
||||||
AddParticipantResponse:
|
CreateParticipantResponse:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
|
@ -785,7 +938,7 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
example: 1
|
example: 1
|
||||||
AddTaskResponse:
|
CreateTaskResponse:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
|
@ -1236,6 +1389,124 @@ components:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/SolutionsListItem'
|
$ref: '#/components/schemas/SolutionsListItem'
|
||||||
|
CreateUserRequest:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- username
|
||||||
|
- password
|
||||||
|
properties:
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
example: user123
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
example: password123
|
||||||
|
CreateUserResponse:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 13
|
||||||
|
GetUserResponse:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- user
|
||||||
|
properties:
|
||||||
|
user:
|
||||||
|
$ref: '#/components/schemas/User'
|
||||||
|
UpdateUserRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
example: user123
|
||||||
|
role:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 1
|
||||||
|
User:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- username
|
||||||
|
- createdAt
|
||||||
|
- modifiedAt
|
||||||
|
- role
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 13
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
example: user123
|
||||||
|
createdAt:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
modifiedAt:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
role:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 1
|
||||||
|
Session:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- userId
|
||||||
|
- role
|
||||||
|
- createdAt
|
||||||
|
- expiresAt
|
||||||
|
- userAgent
|
||||||
|
- ip
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
userId:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 13
|
||||||
|
role:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 1
|
||||||
|
createdAt:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
expiresAt:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
userAgent:
|
||||||
|
type: string
|
||||||
|
example: Mozilla/5.0
|
||||||
|
ip:
|
||||||
|
type: string
|
||||||
|
example: 154.23.50.1
|
||||||
|
ListSessionsResponse:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- sessions
|
||||||
|
properties:
|
||||||
|
sessions:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Session'
|
||||||
|
ListUsersResponse:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- users
|
||||||
|
- pagination
|
||||||
|
properties:
|
||||||
|
users:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/User'
|
||||||
|
pagination:
|
||||||
|
$ref: '#/components/schemas/Pagination'
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
bearerAuth:
|
bearerAuth:
|
||||||
type: http
|
type: http
|
||||||
|
|
Loading…
Add table
Reference in a new issue