feat: add module prefixes to all routes and load all modules in swagger
Route structure: /v1/iam/auth/* (was /v1/auth/*) /v1/iam/users/* (was /v1/users/*) /v1/iam/roles/* (was /v1/roles/*) /v1/iam/permissions/* (was /v1/permissions/*) /v1/landing/cms/events/* (was /v1/cms/landing/events/*) /v1/landing/cms/testimonials/* (was /v1/cms/landing/testimonials/*) /v1/dimentorin/mentors/* (was /v1/mentors/*) /v1/dimentorin/sessions/* (was /v1/sessions/*) /v1/gacha/* (unchanged) /v1/hackathon/* (unchanged) /v1/qr/* (unchanged) Swagger: add gacha_credits endpoints which were missing from OpenAPI spec. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c38b718eb4
commit
76201d8d3e
@@ -17,7 +17,7 @@ use uuid::Uuid;
|
||||
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/v1/mentors/create",
|
||||
path = "/v1/dimentorin/mentors/create",
|
||||
request_body = MentorUserRegisterRequestDto,
|
||||
responses(
|
||||
(status = 200, description = "[PUBLIC] Mentor registered successfully", body = MentorRegisterResponseDto),
|
||||
@@ -41,7 +41,7 @@ pub async fn post_register_mentor(
|
||||
|
||||
#[utoipa::path(
|
||||
put,
|
||||
path = "/v1/mentors/update/{id}",
|
||||
path = "/v1/dimentorin/mentors/update/{id}",
|
||||
params(
|
||||
("id" = String, Path, description = "Mentor ID")
|
||||
),
|
||||
@@ -76,7 +76,7 @@ pub async fn put_update_mentor(
|
||||
|
||||
#[utoipa::path(
|
||||
delete,
|
||||
path = "/v1/mentors/delete/{id}",
|
||||
path = "/v1/dimentorin/mentors/delete/{id}",
|
||||
params(
|
||||
("id" = String, Path, description = "Mentor ID")
|
||||
),
|
||||
@@ -107,7 +107,7 @@ pub async fn delete_mentor(
|
||||
|
||||
#[utoipa::path(
|
||||
put,
|
||||
path = "/v1/mentors/verify/{id}",
|
||||
path = "/v1/dimentorin/mentors/verify/{id}",
|
||||
params(
|
||||
("id" = String, Path, description = "Mentor ID")
|
||||
),
|
||||
@@ -142,7 +142,7 @@ pub async fn put_verify_mentor(
|
||||
|
||||
#[utoipa::path(
|
||||
put,
|
||||
path = "/v1/mentors/me/update",
|
||||
path = "/v1/dimentorin/mentors/me/update",
|
||||
request_body = MentorUpdateRequestDto,
|
||||
responses(
|
||||
(status = 200, description = "[MENTOR] Mentor profile updated successfully", body = MentorDetailResponseDto),
|
||||
@@ -177,7 +177,7 @@ pub async fn put_update_mentor_me(
|
||||
|
||||
#[utoipa::path(
|
||||
put,
|
||||
path = "/v1/mentors/update",
|
||||
path = "/v1/dimentorin/mentors/update",
|
||||
request_body = MentorUpdateRequestDto,
|
||||
responses(
|
||||
(status = 400, description = "[PUBLIC] Bad request - Mentor ID is required for update"),
|
||||
|
||||
@@ -16,7 +16,7 @@ use uuid::Uuid;
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v1/mentors",
|
||||
path = "/v1/dimentorin/mentors",
|
||||
params(
|
||||
("page" = Option<u64>, Query, description = "Page number"),
|
||||
("per_page" = Option<u64>, Query, description = "Items per page"),
|
||||
@@ -53,7 +53,7 @@ pub async fn get_mentor_list(
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v1/mentors/detail/{id}",
|
||||
path = "/v1/dimentorin/mentors/detail/{id}",
|
||||
params(
|
||||
("id" = String, Path, description = "Mentor ID")
|
||||
),
|
||||
@@ -84,7 +84,7 @@ pub async fn get_mentor_by_id(
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v1/mentors/me",
|
||||
path = "/v1/dimentorin/mentors/me",
|
||||
responses(
|
||||
(status = 200, description = "[MENTOR] Current user's mentor profile", body = MentorDetailResponseDto),
|
||||
(status = 401, description = "[MENTOR] Unauthorized - invalid token"),
|
||||
@@ -119,7 +119,7 @@ pub async fn get_mentor_me(
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v1/mentors/me/status",
|
||||
path = "/v1/dimentorin/mentors/me/status",
|
||||
responses(
|
||||
(status = 200, description = "[MENTOR] Mentor application status", body = String),
|
||||
(status = 401, description = "[MENTOR] Unauthorized - invalid token"),
|
||||
|
||||
@@ -16,7 +16,7 @@ use std::sync::Arc;
|
||||
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/v1/mentors/{id}/sessions/create",
|
||||
path = "/v1/dimentorin/mentors/{id}/sessions/create",
|
||||
tag = "sessions",
|
||||
security(("Bearer" = [])),
|
||||
params(
|
||||
@@ -48,7 +48,7 @@ pub async fn post_book_session(
|
||||
|
||||
#[utoipa::path(
|
||||
put,
|
||||
path = "/v1/sessions/update/{id}/status",
|
||||
path = "/v1/dimentorin/sessions/update/{id}/status",
|
||||
tag = "sessions",
|
||||
security(("Bearer" = [])),
|
||||
params(
|
||||
@@ -80,7 +80,7 @@ pub async fn put_update_session_status(
|
||||
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/v1/sessions/{id}/feedback/create",
|
||||
path = "/v1/dimentorin/sessions/{id}/feedback/create",
|
||||
tag = "sessions",
|
||||
security(("Bearer" = [])),
|
||||
params(
|
||||
|
||||
@@ -17,7 +17,7 @@ pub struct SessionStatusFilter {
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v1/mentors/{id}/sessions",
|
||||
path = "/v1/dimentorin/mentors/{id}/sessions",
|
||||
tag = "sessions",
|
||||
security(("Bearer" = [])),
|
||||
params(
|
||||
@@ -48,7 +48,7 @@ pub async fn get_mentor_sessions(
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v1/mentors/{id}/availability",
|
||||
path = "/v1/dimentorin/mentors/{id}/availability",
|
||||
tag = "sessions",
|
||||
params(
|
||||
("id" = String, Path, description = "Mentor ID"),
|
||||
@@ -69,7 +69,7 @@ pub async fn get_mentor_availability(
|
||||
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/v1/users/me/sessions",
|
||||
path = "/v1/dimentorin/sessions/me",
|
||||
tag = "sessions",
|
||||
security(("Bearer" = [])),
|
||||
params(
|
||||
|
||||
@@ -38,7 +38,7 @@ pub fn sessions_protected_routes(
|
||||
put(put_update_session_status),
|
||||
)
|
||||
.route("/sessions/{id}/feedback/create", post(post_submit_feedback))
|
||||
.route("/users/me/sessions", get(get_my_sessions))
|
||||
.route("/sessions/me", get(get_my_sessions))
|
||||
.layer(Extension(service))
|
||||
.layer(Extension((*state).clone()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user