chore: update routes to use utoipa

This commit is contained in:
Zomatree
2025-11-17 22:13:07 +00:00
parent ac60b2c795
commit 43c94b68b0
110 changed files with 891 additions and 231 deletions

View File

@@ -283,6 +283,7 @@ auto_derived!(
/// Options when deleting a channel
#[cfg_attr(feature = "rocket", derive(FromForm))]
#[cfg_attr(feature = "utoipa", derive(IntoParams))]
pub struct OptionsChannelDelete {
/// Whether to not send a leave message
pub leave_silently: Option<bool>,

View File

@@ -1,5 +1,5 @@
auto_derived!(
/// # hCaptcha Configuration
/// hCaptcha Configuration
pub struct CaptchaFeature {
/// Whether captcha is enabled
pub enabled: bool,
@@ -7,7 +7,7 @@ auto_derived!(
pub key: String,
}
/// # Generic Service Configuration
/// Generic Service Configuration
pub struct Feature {
/// Whether the service is enabled
pub enabled: bool,
@@ -15,7 +15,7 @@ auto_derived!(
pub url: String,
}
/// # Voice Server Configuration
/// Voice Server Configuration
pub struct VoiceFeature {
/// Whether voice is enabled
pub enabled: bool,
@@ -25,7 +25,7 @@ auto_derived!(
pub ws: String,
}
/// # Feature Configuration
/// Feature Configuration
pub struct RevoltFeatures {
/// hCaptcha configuration
pub captcha: CaptchaFeature,
@@ -41,7 +41,7 @@ auto_derived!(
pub voso: VoiceFeature,
}
/// # Build Information
/// Build Information
pub struct BuildInformation {
/// Commit Hash
pub commit_sha: String,
@@ -55,7 +55,7 @@ auto_derived!(
pub timestamp: String,
}
/// # Server Configuration
/// Server Configuration
pub struct RevoltConfig {
/// Revolt API Version
pub revolt: String,
@@ -70,4 +70,4 @@ auto_derived!(
/// Build information
pub build: BuildInformation,
}
);
);

View File

@@ -279,6 +279,7 @@ auto_derived!(
/// Options for querying messages
#[cfg_attr(feature = "validator", derive(Validate))]
#[cfg_attr(feature = "rocket", derive(FromForm))]
#[cfg_attr(feature = "utoipa", derive(IntoParams))]
pub struct OptionsQueryMessages {
/// Maximum number of messages to fetch
///
@@ -357,6 +358,7 @@ auto_derived!(
/// Options for removing reaction
#[cfg_attr(feature = "rocket", derive(FromForm))]
#[cfg_attr(feature = "utoipa", derive(IntoParams))]
pub struct OptionsUnreact {
/// Remove a specific user's reaction
pub user_id: Option<String>,

View File

@@ -99,6 +99,7 @@ auto_derived!(
/// Options for fetching all members
#[cfg_attr(feature = "rocket", derive(FromForm))]
#[cfg_attr(feature = "utoipa", derive(IntoParams))]
pub struct OptionsFetchAllMembers {
/// Whether to exclude offline users
pub exclude_offline: Option<bool>,

View File

@@ -198,6 +198,7 @@ auto_derived!(
/// Options when fetching server
#[cfg_attr(feature = "rocket", derive(FromForm))]
#[cfg_attr(feature = "utoipa", derive(IntoParams))]
pub struct OptionsFetchServer {
/// Whether to include channels
pub include_channels: Option<bool>,
@@ -284,6 +285,7 @@ auto_derived!(
/// Options when leaving a server
#[cfg_attr(feature = "rocket", derive(FromForm))]
#[cfg_attr(feature = "utoipa", derive(IntoParams))]
pub struct OptionsServerDelete {
/// Whether to not send a leave message
pub leave_silently: Option<bool>,

View File

@@ -17,6 +17,7 @@ auto_derived!(
/// Additional options for inserting settings
#[cfg_attr(feature = "rocket", derive(FromForm))]
#[cfg_attr(feature = "utoipa", derive(IntoParams))]
pub struct OptionsSetSettings {
/// Timestamp of settings change.
///