chore: update swagger

This commit is contained in:
Derrick Hammer 2024-03-13 17:28:21 -04:00
parent 2d0c55848b
commit 6f1d761c99
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 222 additions and 213 deletions

View File

@ -12,15 +12,15 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/LoginRequest"
$ref: '#/components/schemas/LoginRequest'
responses:
"200":
'200':
description: Successfully logged in
content:
application/json:
schema:
$ref: "#/components/schemas/LoginResponse"
"401":
$ref: '#/components/schemas/LoginResponse'
'401':
description: Unauthorized
/api/auth/register:
post:
@ -30,11 +30,11 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisterRequest"
$ref: '#/components/schemas/RegisterRequest'
responses:
"200":
'200':
description: Successfully registered
"400":
'400':
description: Bad Request
/api/auth/verify-email:
post:
@ -44,20 +44,20 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/VerifyEmailRequest"
$ref: '#/components/schemas/VerifyEmailRequest'
responses:
"200":
'200':
description: Email verified successfully
/api/auth/otp/generate:
get:
summary: Generate OTP for two-factor authentication
responses:
"200":
'200':
description: OTP generated successfully
content:
application/json:
schema:
$ref: "#/components/schemas/OTPGenerateResponse"
$ref: '#/components/schemas/OTPGenerateResponse'
/api/auth/otp/verify:
post:
summary: Verify OTP for enabling two-factor authentication
@ -66,9 +66,9 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/OTPVerifyRequest"
$ref: '#/components/schemas/OTPVerifyRequest'
responses:
"200":
'200':
description: OTP verified successfully
/api/auth/otp/validate:
post:
@ -78,9 +78,9 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/OTPValidateRequest"
$ref: '#/components/schemas/OTPValidateRequest'
responses:
"200":
'200':
description: OTP validated successfully
/api/auth/otp/disable:
post:
@ -90,9 +90,9 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/OTPDisableRequest"
$ref: '#/components/schemas/OTPDisableRequest'
responses:
"200":
'200':
description: OTP disabled successfully
/api/auth/password-reset/request:
post:
@ -102,9 +102,9 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/PasswordResetRequest"
$ref: '#/components/schemas/PasswordResetRequest'
responses:
"200":
'200':
description: Password reset requested successfully
/api/auth/password-reset/confirm:
post:
@ -114,17 +114,21 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/PasswordResetVerifyRequest"
$ref: '#/components/schemas/PasswordResetVerifyRequest'
responses:
"200":
'200':
description: Password reset successfully
/api/auth/ping:
post:
summary: Auth check endpoint
responses:
"200":
'200':
description: Pong
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/PingResponse'
'401':
description: Unauthorized
components:
@ -147,14 +151,14 @@ components:
RegisterRequest:
type: object
required:
- firstName
- lastName
- first_name
- last_name
- email
- password
properties:
firstName:
first_name:
type: string
lastName:
last_name:
type: string
email:
type: string
@ -216,3 +220,8 @@ components:
type: string
password:
type: string
PingResponse:
type: object
properties:
ping:
type: string