refactor(export): refresh export crate across auth and openapi
zhenyi committed
Modified lib/export/auth/password_hash.rs lib/export/auth/password_hash.rs +0 −3 View lib/export/auth/password_hash.rs
@@ -1,12 +1,10 @@
11use serde::{Deserialize, Serialize};
22
3/// Input payload for hashing / verifying a password.
43#[derive(Debug, Clone)]
54pub struct PasswordInput<'a> {
65 pub password: &'a str,
76}
87
9/// Result of [`hash_password`]: a PHC-formatted Argon2id string.
108#[derive(Debug, Clone, Serialize, Deserialize)]
119pub struct PasswordHashString(pub String);
1210
@@ -16,7 +14,6 @@
1614 }
1715}
1816
19/// Strength validation request for the password policy.
2017#[derive(Debug, Clone)]
2118pub struct ValidatePasswordRequest<'a> {
2219 pub password: &'a str,
Modified lib/export/openapi.rs lib/export/openapi.rs +0 −26 View lib/export/openapi.rs
@@ -1,9 +1,6 @@
11use utoipa::Modify;
22use utoipa::openapi::OpenApi as OpenApiValue;
33
4/// Prepends a fixed path prefix to every entry in `OpenApi::paths`.
5///
6/// Used by the `openapi_modify_prefix!` macro; also usable directly via
74/// `#[openapi(modifiers(&PrefixModifier { prefix: ... }))]`.
85pub struct PrefixModifier {
96 pub prefix: String,
@@ -23,16 +20,6 @@
2320 }
2421}
2522
26/// Build the OpenAPI spec for `$doc` and prepend `$prefix` to every path.
27///
28/// Returns the modified `utoipa::openapi::OpenApi` value.
29///
30/// # Example
31/// ```ignore
32/// use export::openapi_modify_prefix;
33/// use auth::handler::AuthApiDoc;
34/// let spec = openapi_modify_prefix!(AuthApiDoc, "/api/v1");
35/// ```
3623#[macro_export]
3724macro_rules! openapi_modify_prefix {
3825 ($doc:ty, $prefix:expr) => {{
@@ -45,19 +32,6 @@
4532 }};
4633}
4734
48/// Merge multiple OpenAPI docs into one via `OpenApi::merge`, left-to-right.
49///
50/// Returns the merged `utoipa::openapi::OpenApi` value. Per `OpenApi::merge`,
51/// `info`, `openapi`, `external_docs`, and `schema` from later docs are dropped
52/// — the first doc's values win.
53///
54/// # Example
55/// ```ignore
56/// use export::openapi_concat;
57/// use auth::handler::AuthApiDoc;
58/// use user::handler::UserApiDoc;
59/// let all = openapi_concat!(AuthApiDoc, UserApiDoc);
60/// ```
6135#[macro_export]
6236macro_rules! openapi_concat {
6337 ($first:ty $(, $rest:ty)* $(,)?) => {{