diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2025-01-26 19:11:24 +0100 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2025-01-26 19:11:24 +0100 |
commit | c622eab39ac7dd9f794b5d60eb937e29c9b3bd6e (patch) | |
tree | a75067a661250a4ed74096929083948f65c01fdb /src/api/mod.rs | |
parent | 5891af7e8c1411029fe1ad9c6d3182f88bcf3dfd (diff) |
add api documentation
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r-- | src/api/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs index 2a7c3a8..fc97f47 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -1,5 +1,6 @@ use actix_web::{web, HttpResponse, Scope}; use serde::{Deserialize, Serialize}; +use utoipa::ToSchema; pub mod album; pub mod artist; @@ -24,9 +25,10 @@ pub fn api_scope() -> Scope { .service(search_results::search_results) } -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, ToSchema)] pub struct Response { - message: String, + #[schema(default = "response")] + pub message: String, } pub fn get_response_from_query( |