feat(H): H-WIKI/H-VER/H-LINK — Wiki plugin (articles, categories, versioning, entity links), migration 0126, 9 routes, 15 tests passing
Check Cross-Plugin Imports / check (push) Has been cancelled

This commit is contained in:
Agent Zero
2026-08-18 11:55:43 +02:00
parent e50f6a601f
commit 396fdf3c9a
8 changed files with 622 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
"""Pydantic schemas for the Wiki plugin."""
from __future__ import annotations
from datetime import datetime
from pydantic import BaseModel, Field
class CategoryCreate(BaseModel):
name: str = Field(..., min_length=1, max_length=200)
slug: str = Field(..., min_length=1, max_length=200)
description: str | None = None
parent_id: str | None = None
sort_order: int = 0
class CategoryUpdate(BaseModel):
name: str | None = None
description: str | None = None
parent_id: str | None = None
sort_order: int | None = None
class ArticleCreate(BaseModel):
title: str = Field(..., min_length=1, max_length=300)
slug: str = Field(..., min_length=1, max_length=300)
content: str = ""
summary: str | None = None
category_id: str | None = None
tags: list[str] = Field(default_factory=list)
status: str = Field(default="draft", pattern="^(draft|published|archived)$")
entity_links: list[dict] = Field(default_factory=list)
class ArticleUpdate(BaseModel):
title: str | None = None
content: str | None = None
summary: str | None = None
category_id: str | None = None
tags: list[str] | None = None
status: str | None = Field(None, pattern="^(draft|published|archived)$")
entity_links: list[dict] | None = None
edit_comment: str | None = None