feat(presentation): OpenAPI docs at /docs (Swagger) and /scalar
This commit is contained in:
15
crates/presentation/src/openapi/thoughts.rs
Normal file
15
crates/presentation/src/openapi/thoughts.rs
Normal 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;
|
||||
Reference in New Issue
Block a user