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/database/user.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/database/user.rs') diff --git a/src/database/user.rs b/src/database/user.rs index ff7b1ab..d3202ce 100644 --- a/src/database/user.rs +++ b/src/database/user.rs @@ -1,6 +1,7 @@ use crate::database::DatabaseWrapper; use serde::{Deserialize, Serialize}; use sqlx::mysql::MySqlQueryResult; +use utoipa::ToSchema; #[derive(Deserialize, Serialize)] pub struct User { @@ -9,9 +10,11 @@ pub struct User { password: Option, } -#[derive(Deserialize, Serialize)] +#[derive(Deserialize, Serialize, ToSchema)] pub struct UserForm { + #[schema(example = "username")] name: Option, + #[schema(example = "password")] password: Option, } -- cgit v1.2.3