fix(api): resolve all OpenAPI schema reference errors

- Add #[schema(value_type = Option<String>)] on chrono::DateTime fields
- Register SeriesPage in openapi.rs components
- Fix module-prefixed ref (index_jobs::IndexJobResponse -> IndexJobResponse)
- Strengthen test: assert all $ref targets exist in components/schemas

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 22:27:52 +01:00
parent f1b3aec94a
commit 4c75e08056
3 changed files with 23 additions and 12 deletions

View File

@@ -6,7 +6,7 @@ use serde::Deserialize;
use uuid::Uuid;
use utoipa::ToSchema;
use crate::{error::ApiError, index_jobs, state::AppState};
use crate::{error::ApiError, index_jobs::{self, IndexJobResponse}, state::AppState};
#[derive(Deserialize, ToSchema)]
pub struct ThumbnailsRebuildRequest {
@@ -21,7 +21,7 @@ pub struct ThumbnailsRebuildRequest {
tag = "indexing",
request_body = Option<ThumbnailsRebuildRequest>,
responses(
(status = 200, body = index_jobs::IndexJobResponse),
(status = 200, body = IndexJobResponse),
(status = 401, description = "Unauthorized"),
(status = 403, description = "Forbidden - Admin scope required"),
),
@@ -55,7 +55,7 @@ pub async fn start_thumbnails_rebuild(
tag = "indexing",
request_body = Option<ThumbnailsRebuildRequest>,
responses(
(status = 200, body = index_jobs::IndexJobResponse),
(status = 200, body = IndexJobResponse),
(status = 401, description = "Unauthorized"),
(status = 403, description = "Forbidden - Admin scope required"),
),