Spaces:
Runtime error
Runtime error
| import os | |
| from pydantic import BaseModel | |
| class Document(BaseModel): | |
| id: int | |
| name: str | None | |
| owner: str | None | |
| status: str | |
| class Config: | |
| json_schema_extra = { | |
| 'example': { | |
| 'id': 1, | |
| 'name': 'Положение о положении', | |
| 'owner': 'Отдел управления отделами', | |
| 'status': 'Актуален', | |
| } | |
| } | |
| class DocumentDownload(BaseModel): | |
| filename: str | |
| filepath: str | os.PathLike | |
| class Config: | |
| json_schema_extra = { | |
| 'example': { | |
| 'filename': 'Положение о положении.xml', | |
| 'filepath': '/path/to/file.xml', | |
| } | |
| } | |