api: add session delete api doc
This commit is contained in:
parent
544ccbe1ca
commit
2fe834fe55
@ -76,7 +76,6 @@ paths:
|
||||
/session/create:
|
||||
post:
|
||||
tags:
|
||||
- user
|
||||
- session
|
||||
description: Create a new session for a user
|
||||
requestBody:
|
||||
@ -85,6 +84,41 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SessionCreateRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
token:
|
||||
type: string
|
||||
example: fakjshdflauhkjhsometokenakjsdhfaksj
|
||||
'400':
|
||||
description: Client side error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
example: AuthFailure
|
||||
message:
|
||||
type: string
|
||||
example: "wrong email password."
|
||||
'500':
|
||||
description: Server side error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrResponse'
|
||||
/session/delete:
|
||||
post:
|
||||
tags:
|
||||
- session
|
||||
description: Delete an existing session for a user
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
@ -110,13 +144,15 @@ paths:
|
||||
example: AuthFailure
|
||||
message:
|
||||
type: string
|
||||
example: "wrong email password."
|
||||
example: "user not logged in."
|
||||
'500':
|
||||
description: Server side error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrResponse'
|
||||
security:
|
||||
- jwt: []
|
||||
|
||||
components:
|
||||
schemas:
|
||||
@ -161,3 +197,9 @@ components:
|
||||
message:
|
||||
type: string
|
||||
example: "Server internal error."
|
||||
securitySchemes:
|
||||
jwt:
|
||||
name: Bearer authentication
|
||||
type: http
|
||||
bearerFormat: "JWT"
|
||||
scheme: bearer
|
||||
|
Loading…
Reference in New Issue
Block a user