Initial commit: svg backend
This commit is contained in:
28
backend/app/schemas/manifest.py
Normal file
28
backend/app/schemas/manifest.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class SvgLimitsManifest(BaseModel):
|
||||
max_file_size_bytes: int
|
||||
max_elements: int
|
||||
|
||||
|
||||
class SanitizationManifest(BaseModel):
|
||||
allow_internal_use_references_only: bool
|
||||
forbid_foreign_object_v1: bool
|
||||
forbid_style_v1: bool
|
||||
forbid_image_v1: bool
|
||||
allowed_data_attributes: list[str]
|
||||
|
||||
|
||||
class ExtractionContractManifest(BaseModel):
|
||||
seat_fields: list[str]
|
||||
priority: list[str]
|
||||
|
||||
|
||||
class ServiceManifestResponse(BaseModel):
|
||||
service: str
|
||||
api_prefix: str
|
||||
auth_header_name: str
|
||||
svg_limits: SvgLimitsManifest
|
||||
sanitization: SanitizationManifest
|
||||
extraction_contract: ExtractionContractManifest
|
||||
Reference in New Issue
Block a user