forked from mtusi2026/mtusi2026lab4
Implement lab4 attachments on RustFS for grade 4.
Carry over lab3 HA stack and add private S3 storage, Attachment API, orphan compensation/reaper, own tests, and evidence for smoke/persistence/failover.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"""Схемы тел запросов для OpenAPI / Swagger (валидация домена — в services)."""
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class CreateUserBody(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
username: str = Field(..., examples=["alice"])
|
||||
display_name: str = Field(..., examples=["Алиса"])
|
||||
password: str = Field(..., examples=["Example-only-not-a-real-secret-123"])
|
||||
|
||||
|
||||
class CreateChatBody(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
title: str = Field(..., examples=["Проект по ВНП"])
|
||||
member_ids: List[str] = Field(
|
||||
...,
|
||||
examples=[["11111111-1111-4111-8111-111111111111"]],
|
||||
)
|
||||
|
||||
|
||||
class CreateMessageBody(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
text: str = Field(..., examples=["Привет, Боб!"])
|
||||
attachment_ids: List[str] = Field(default_factory=list)
|
||||
|
||||
Reference in New Issue
Block a user