feat(presentation): OpenAPI docs at /docs (Swagger) and /scalar

This commit is contained in:
2026-05-14 11:41:12 +02:00
parent 137d1a0c6a
commit 1866eef770
11 changed files with 164 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
use utoipa::OpenApi;
use api_types::{requests::{CreateThoughtRequest, EditThoughtRequest}, responses::ErrorResponse};
#[derive(OpenApi)]
#[openapi(
paths(
crate::handlers::thoughts::post_thought,
crate::handlers::thoughts::get_thought_handler,
crate::handlers::thoughts::patch_thought,
crate::handlers::thoughts::delete_thought_handler,
crate::handlers::thoughts::get_thread_handler,
),
components(schemas(CreateThoughtRequest, EditThoughtRequest, ErrorResponse))
)]
pub struct ThoughtsDoc;