diff --git a/backend/feature/post/src/adapter/delivery/create_post_request_dto.rs b/backend/feature/post/src/adapter/delivery/create_post_request_dto.rs index 874c059..3a2856b 100644 --- a/backend/feature/post/src/adapter/delivery/create_post_request_dto.rs +++ b/backend/feature/post/src/adapter/delivery/create_post_request_dto.rs @@ -12,8 +12,8 @@ pub struct CreatePostRequestDto { pub content: String, pub label_ids: Vec, - #[schema(format = Uri)] - pub preview_image_url: String, + #[schema(required, format = Uri)] + pub preview_image_url: Option, #[schema(required, format = DateTime)] pub published_time: Option, diff --git a/backend/feature/post/src/adapter/delivery/post_info_response_dto.rs b/backend/feature/post/src/adapter/delivery/post_info_response_dto.rs index bb83498..7553423 100644 --- a/backend/feature/post/src/adapter/delivery/post_info_response_dto.rs +++ b/backend/feature/post/src/adapter/delivery/post_info_response_dto.rs @@ -14,7 +14,7 @@ pub struct PostInfoResponseDto { pub labels: Vec, #[schema(format = Uri)] - pub preview_image_url: String, + pub preview_image_url: Option, #[schema(format = DateTime)] pub published_time: Option, diff --git a/backend/feature/post/src/adapter/delivery/update_post_request_dto.rs b/backend/feature/post/src/adapter/delivery/update_post_request_dto.rs index 5f93c5f..b5e839b 100644 --- a/backend/feature/post/src/adapter/delivery/update_post_request_dto.rs +++ b/backend/feature/post/src/adapter/delivery/update_post_request_dto.rs @@ -12,8 +12,8 @@ pub struct UpdatePostRequestDto { pub content: String, pub label_ids: Vec, - #[schema(format = Uri)] - pub preview_image_url: String, + #[schema(required, format = Uri)] + pub preview_image_url: Option, #[schema(required, format = DateTime)] pub published_time: Option, diff --git a/backend/feature/post/src/adapter/gateway/post_info_db_mapper.rs b/backend/feature/post/src/adapter/gateway/post_info_db_mapper.rs index 6663175..9478738 100644 --- a/backend/feature/post/src/adapter/gateway/post_info_db_mapper.rs +++ b/backend/feature/post/src/adapter/gateway/post_info_db_mapper.rs @@ -7,7 +7,7 @@ pub struct PostInfoMapper { pub semantic_id: String, pub title: String, pub description: String, - pub preview_image_url: String, + pub preview_image_url: Option, pub published_time: Option, pub labels: Vec, } diff --git a/backend/feature/post/src/domain/entity/post_info.rs b/backend/feature/post/src/domain/entity/post_info.rs index 922be11..3aebd5a 100644 --- a/backend/feature/post/src/domain/entity/post_info.rs +++ b/backend/feature/post/src/domain/entity/post_info.rs @@ -10,7 +10,7 @@ pub struct PostInfo { pub semantic_id: String, pub title: String, pub description: String, - pub preview_image_url: String, + pub preview_image_url: Option, pub labels: Vec