Skip to content

Commit

Permalink
change utopia response description for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
felix1251 committed Feb 11, 2024
1 parent 857a0c3 commit 38feccf
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/routes/auth/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ pub struct InvalidCredentials {
tag = "Auth",
path = "/auth/sign_in",
responses(
(status = 200, description = "Token Response", body = AuthTokens),
(status = 404, description = "Invalid Credentials", body = InvalidCredentials),
(status = 500, description = "Internal Server Error", body = InternalErrorSchema),
(status = 200, description = "Token response", body = AuthTokens),
(status = 404, description = "Invalid credentials", body = InvalidCredentials),
(status = 422, description = "Request body validation errors", body = ValidationErrorSchema),
(status = 500, description = "Internal server error", body = InternalErrorSchema),
)
)]
pub async fn sign_in(
Expand Down Expand Up @@ -99,8 +100,8 @@ pub struct SignUpParams {
path = "/auth/sign_up",
responses(
(status = 201, description = "User created with token response", body = AuthTokens),
(status = 422, description = "Validation Errors", body = ValidationErrorSchema),
(status = 500, description = "Internal Server Error", body = InternalErrorSchema),
(status = 422, description = "Request body validation errors", body = ValidationErrorSchema),
(status = 500, description = "Internal server error", body = InternalErrorSchema),
)
)]
pub async fn sign_up(
Expand Down Expand Up @@ -186,9 +187,9 @@ pub struct CurrentUser {
tag = "Auth",
path = "/auth/me",
responses(
(status = 200, description = "Current user", body = CurrentUser),
(status = 200, description = "Current user info", body = CurrentUser),
(status = 401, description = "Unauthenticated", body = UnauthorizedSchema),
(status = 500, description = "Internal Server Error", body = InternalErrorSchema),
(status = 500, description = "Internal server error", body = InternalErrorSchema),
),
security(("bearer_auth" = []))
)]
Expand Down

0 comments on commit 38feccf

Please sign in to comment.