add request body schema to change password endpoint

This commit is contained in:
DSeeLP 2025-04-18 17:24:07 +02:00
parent a159fa42c2
commit 6141cefa41
3 changed files with 8 additions and 1 deletions

View File

@ -11,4 +11,4 @@ mod util;
pub use error::*; pub use error::*;
pub use util::*; pub use util::*;
make_schemas!((Credentials); (ApiError, TokenResponse), [account::schemas, chat::schemas, transaction::schemas, user::schemas, meta::schemas]); make_schemas!((Credentials, ChangePassword); (ApiError, TokenResponse), [account::schemas, chat::schemas, transaction::schemas, user::schemas, meta::schemas]);

View File

@ -5,6 +5,8 @@ use regex::Regex;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use uuid::Uuid; use uuid::Uuid;
use crate::make_schemas;
pub static NAME_PATTERN_RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(NAME_PATTERN).unwrap()); pub static NAME_PATTERN_RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(NAME_PATTERN).unwrap());
pub static USER_ACCOUNT_PATTERN_RE: LazyLock<Regex> = pub static USER_ACCOUNT_PATTERN_RE: LazyLock<Regex> =
LazyLock::new(|| Regex::new(USER_ACCOUNT_PATTERN).unwrap()); LazyLock::new(|| Regex::new(USER_ACCOUNT_PATTERN).unwrap());

View File

@ -150,6 +150,11 @@ paths:
- Users - Users
security: security:
- bearer: [] - bearer: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ChangePassword'
responses: responses:
200: 200:
description: Ok description: Ok