drop legacy format support (you shouldn't support it too)

Changed files
-34
src
atpasser
model
-34
src/atpasser/model/__init__.py
···
return v
-
class LegacyBlobModel(BaseModel):
-
"""
-
Model for deprecated legacy blob format.
-
-
This format is still found in some records but should not be written.
-
"""
-
-
cid: str
-
"""CID in string format (not link format)"""
-
-
mimeType: str
-
"""Content type of blob"""
-
-
model_config = ConfigDict(arbitrary_types_allowed=True)
-
-
@field_validator("mimeType")
-
def validateMimeType(cls, v: str) -> str:
-
"""
-
Validate that mimeType is not empty.
-
-
Args:
-
v: MIME type to validate
-
-
Returns:
-
Validated MIME type
-
-
Raises:
-
ValueError: If MIME type is empty
-
"""
-
if not v:
-
raise ValueError("MIME type cannot be empty")
-
return v
-
-
class TypedDataModel(DataModel):
"""
Model for AT Protocol data with type information.
···
return v
class TypedDataModel(DataModel):
"""
Model for AT Protocol data with type information.