Add utoipa info for v2 routes (#5775)

* wip: add v2 docs, routes to config, paths

* fix up path prefixes

* fix leading slashes

* fix slash route

* fix more slashes

* wip: full utopification of v2

* convert last few v2 routes to utoipa
This commit is contained in:
aecsocket
2026-04-15 13:25:35 +00:00
committed by GitHub
parent baee34b0b6
commit f12bd7b4b8
28 changed files with 1979 additions and 211 deletions
+9 -5
View File
@@ -18,7 +18,7 @@ use serde::{Deserialize, Serialize};
use validator::Validate;
/// A project returned from the API
#[derive(Serialize, Deserialize, Clone)]
#[derive(Serialize, Deserialize, Clone, utoipa::ToSchema)]
pub struct LegacyProject {
/// Relevant V2 fields- these were removed or modified in V3,
/// and are now part of the dynamic fields system
@@ -253,7 +253,9 @@ impl LegacyProject {
}
}
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Copy)]
#[derive(
Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Copy, utoipa::ToSchema,
)]
#[serde(rename_all = "kebab-case")]
pub enum LegacySideType {
Required,
@@ -290,7 +292,7 @@ impl LegacySideType {
}
/// A specific version of a project
#[derive(Serialize, Deserialize, Clone)]
#[derive(Serialize, Deserialize, Clone, utoipa::ToSchema)]
pub struct LegacyVersion {
/// Relevant V2 fields- these were removed or modified in V3,
/// and are now part of the dynamic fields system
@@ -368,7 +370,7 @@ impl From<Version> for LegacyVersion {
}
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(Serialize, Deserialize, Clone, Debug, utoipa::ToSchema)]
pub struct LegacyGalleryItem {
pub url: String,
pub raw_url: String,
@@ -393,7 +395,9 @@ impl LegacyGalleryItem {
}
}
#[derive(Serialize, Deserialize, Validate, Clone, Eq, PartialEq)]
#[derive(
Serialize, Deserialize, Validate, Clone, Eq, PartialEq, utoipa::ToSchema,
)]
pub struct DonationLink {
pub id: String,
pub platform: String,