Skip to content

Commit

Permalink
made file_name editable #35
Browse files Browse the repository at this point in the history
  • Loading branch information
asuresh-code committed Dec 9, 2024
1 parent 9a5c324 commit 3f70a32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions object_storage_api/schemas/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@


class ImagePatchMetadataSchema(BaseModel):
"""
Base schema model for an image.
"""
"""Base schema model for an image."""

title: Optional[str] = Field(default=None, description="Title of the image")
description: Optional[str] = Field(default=None, description="Description of the image")
file_name: Optional[str] = Field(default=None, description="File name of the image")


class ImagePostMetadataSchema(ImagePatchMetadataSchema):
class ImagePostMetadataSchema(BaseModel):
"""Base schema model for an image."""

title: Optional[str] = Field(default=None, description="Title of the image")
description: Optional[str] = Field(default=None, description="Description of the image")
entity_id: str = Field(description="ID of the entity the image relates to")


Expand Down
1 change: 1 addition & 0 deletions test/mock_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
IMAGE_PATCH_METADATA_DATA_ALL_VALUES_B = {
"title": "Shattered Laser",
"description": "An image of a shattered laser.",
"file_name": "picture.jpg",
}

IMAGE_POST_METADATA_DATA_ALL_VALUES = {
Expand Down

0 comments on commit 3f70a32

Please sign in to comment.