From c622eab39ac7dd9f794b5d60eb937e29c9b3bd6e Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Sun, 26 Jan 2025 19:11:24 +0100 Subject: add api documentation --- src/api/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/api/mod.rs') 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( -- cgit v1.2.3