chore: beta release v0.5.0-beta
- Bump version to 0.5.0-beta - Add Apache-2.0 LICENSE (official text) + NOTICE - Add Docker support: multi-stage Dockerfile + docker-compose * non-root user, tini PID 1, gunicorn + uvicorn workers * healthcheck, OCI labels, persistent /data volume - Add GitHub Actions CI (lint/import-check + Docker smoke-test) - Backend polish: * modern lifespan handler (replaces deprecated on_event) * explicit sort validation (400 instead of 500) * title min_length=1 schema validation * configurable data dir + http timeout via env * avg_rating helper extracted (DRY) - Frontend polish: * beta badge in title, footer with live version * loading spinner on initial fetch * updated README, badges, config table, roadmap
This commit is contained in:
+6
-3
@@ -1,4 +1,5 @@
|
||||
"""Pydantic-Schemas für API-Ein- und -Ausgabe."""
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import date, datetime
|
||||
@@ -7,15 +8,17 @@ from typing import List, Literal, Optional
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
# ---------- Eingaben ---------------------------------------------------------
|
||||
# ---------- Typen ------------------------------------------------------------
|
||||
|
||||
MediaKind = Literal["book", "series"]
|
||||
MediaStatus = Literal["plan", "reading", "done", "hold", "dropped"]
|
||||
|
||||
|
||||
# ---------- Eingaben ---------------------------------------------------------
|
||||
|
||||
class MediaBase(BaseModel):
|
||||
kind: MediaKind
|
||||
title: str = Field(..., max_length=200)
|
||||
title: str = Field(..., max_length=200, min_length=1)
|
||||
original_title: Optional[str] = Field(None, max_length=200)
|
||||
description: Optional[str] = None
|
||||
cover_url: Optional[str] = Field(None, max_length=600)
|
||||
@@ -53,7 +56,7 @@ class MediaCreate(MediaBase):
|
||||
|
||||
class MediaUpdate(BaseModel):
|
||||
"""Alle Felder optional – PATCH-Semantik."""
|
||||
title: Optional[str] = Field(None, max_length=200)
|
||||
title: Optional[str] = Field(None, max_length=200, min_length=1)
|
||||
original_title: Optional[str] = None
|
||||
description: Optional[str] = None
|
||||
cover_url: Optional[str] = None
|
||||
|
||||
Reference in New Issue
Block a user