Skip to content

[Refactor] Update minor changes in flowerSpot related Apis#96

Merged
LeeHanEum merged 3 commits intodevelopfrom
refactor/minor-changes-flowerspot
Feb 5, 2026
Merged

[Refactor] Update minor changes in flowerSpot related Apis#96
LeeHanEum merged 3 commits intodevelopfrom
refactor/minor-changes-flowerspot

Conversation

@LeeHanEum
Copy link
Collaborator

@LeeHanEum LeeHanEum commented Feb 5, 2026

🌱 관련 이슈

📌 작업 내용 및 특이 사항

  • 개화 상태 조회 시 업로드한 날짜 포함하도록 변경
  • 랜드마크 검색 시 벚꽃길에는 flowerSpotId를 포함하도록 변경

📝 참고

📌 체크 리스트

  • 리뷰어를 추가하셨나요 ?
  • 변경사항에 대해 충분히 설명하고 있나요 ?

Summary by CodeRabbit

Release Notes

  • New Features

    • Image metadata now includes upload timestamps in API responses.
    • Place search results now identify associated flower spots.
  • Refactor

    • Enhanced image information structure in flower spot details and responses.

@LeeHanEum LeeHanEum requested a review from char-yb February 5, 2026 06:33
@LeeHanEum LeeHanEum self-assigned this Feb 5, 2026
@LeeHanEum LeeHanEum linked an issue Feb 5, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

This PR refactors image handling across the AWS S3 integration and API response layers. The changes introduce S3ImageInfo data class with URL and upload timestamp, update ImageS3Processor to return enriched image metadata instead of plain URLs, add object metadata retrieval to AwsS3Client, and restructure domain and API response models to work with the new image data structure.

Changes

Cohort / File(s) Summary
AWS S3 Client
pida-clients/aws-client/src/main/kotlin/com/pida/client/aws/s3/AwsS3Client.kt, pida-clients/aws-client/src/main/kotlin/com/pida/client/aws/image/ImageS3Processor.kt
Added getObjectLastModified() method to fetch object metadata. Updated getImageUrl() return type from List<String> to List<S3ImageInfo>, enriching results with timestamps via lastModified and constructing S3ImageInfo entries with URL and uploadedAt.
Domain Models
pida-core/core-domain/src/main/kotlin/com/pida/support/aws/S3ImageInfo.kt, pida-core/core-domain/src/main/kotlin/com/pida/flowerspot/FlowerSpotImage.kt, pida-core/core-domain/src/main/kotlin/com/pida/support/aws/ImageS3Caller.kt, pida-core/core-domain/src/main/kotlin/com/pida/flowerspot/FlowerSpotDetails.kt, pida-core/core-domain/src/main/kotlin/com/pida/flowerspot/FlowerSpotFacade.kt
Introduced new S3ImageInfo and FlowerSpotImage data classes. Updated ImageS3Caller interface return type to List<S3ImageInfo>. Refactored FlowerSpotDetails from imageUrls: List<String> to images: List<FlowerSpotImage> with mapping logic. Updated FlowerSpotFacade variable names and factory calls.
API Response Models
pida-core/core-api/src/main/kotlin/com/pida/presentation/v1/flowerspot/response/FlowerSpotImageResponse.kt, pida-core/core-api/src/main/kotlin/com/pida/presentation/v1/flowerspot/response/FlowerSpotDetailsResponse.kt, pida-core/core-api/src/main/kotlin/com/pida/presentation/v1/place/response/PlaceSearchResponse.kt, pida-core/core-api/src/main/kotlin/com/pida/presentation/v1/flowerspot/response/FlowerSpotAllResponse.kt
Added new FlowerSpotImageResponse DTO with url and createdAt fields. Updated FlowerSpotDetailsResponse.imageUrls from List<String> to List<FlowerSpotImageResponse> with mapping. Enhanced PlaceSearchResponse with new optional flowerSpotId field, added field-level Schema annotations for required fields, and updated address assembly logic. Updated FlowerSpotAllResponse previewUrl construction to use new images structure.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • PR #68: Main PR builds on S3 image upload integration from this PR—both modify ImageS3Processor and AwsS3Client with getImageUrl flow enhancements and return type changes to S3ImageInfo.
  • PR #81: Both PRs modify FlowerSpotAllResponse previewUrl mapping to work with the new images/S3ImageInfo data structure.
  • PR #88: Both PRs update place response types (PlaceSearchResponse) with field additions and schema annotations for place/district-related search results.

Suggested reviewers

  • char-yb

Poem

🐰 Image URLs now flow with grace,
Timestamps marking upload's place,
From strings to objects, rich and bright,
S3 metadata shines in light!
hops happily with fresh refactored delight

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive Title is partially related but vague. It uses 'minor changes' and doesn't specify the actual changes: adding upload dates to flowerSpot images and flowerSpotId to place search results. Make the title more specific: '[Refactor] Add upload dates to flowerSpot images and flowerSpotId to place search results' or similar to convey the actual changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Code changes align with issue #95 objectives: upload dates added to flowerSpot image retrieval and flowerSpotId included in place/landmark search responses.
Out of Scope Changes check ✅ Passed All changes are within scope. Image model refactoring (ImageS3Processor, AwsS3Client, FlowerSpotImage, S3ImageInfo) and API response updates (FlowerSpotDetailsResponse, PlaceSearchResponse) directly support the two stated objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/minor-changes-flowerspot

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@pida-clients/aws-client/src/main/kotlin/com/pida/client/aws/image/ImageS3Processor.kt`:
- Line 49: Wrap the call to getObjectLastModified() inside presignedGet() in a
try-catch that specifically catches NoSuchKeyException and
AccessDeniedException; when either is caught, skip that S3 object (do not add an
S3ImageInfo for it) and continue processing the rest, optionally logging the key
and exception at debug level, so presignedGet() returns only valid S3ImageInfo
entries instead of throwing a 500; ensure you reference the presignedGet() and
getObjectLastModified() methods and handle exceptions locally rather than
letting them propagate.

In
`@pida-core/core-api/src/main/kotlin/com/pida/presentation/v1/flowerspot/response/FlowerSpotDetailsResponse.kt`:
- Around line 55-56: The change to FlowerSpotDetailsResponse altered imageUrls
from List<String> to List<FlowerSpotImageResponse>, which breaks clients; revert
imageUrls back to List<String> (preserving its Schema) and add a new field
(e.g., images or imageDetails: List<FlowerSpotImageResponse>) to carry the
enriched payload, or introduce a new response version class; update any
serialization/constructor usage for FlowerSpotDetailsResponse and ensure both
imageUrls and the new field are populated where images are built so existing
clients keep receiving the string list while new clients can use the enriched
objects.
🧹 Nitpick comments (1)
pida-core/core-api/src/main/kotlin/com/pida/presentation/v1/place/response/PlaceSearchResponse.kt (1)

43-44: Consider schema clarity for nullable address field.

The address field is typed as String? (nullable) but annotated with requiredMode = REQUIRED. While this is valid in OpenAPI 3.x (required means "present in response", not "non-null"), it may confuse API consumers who expect required fields to always have values.

Consider either:

  1. Adding a description note that the field can be null, or
  2. Using requiredMode = NOT_REQUIRED if the intent is that it's optional

Copy link
Member

@char-yb char-yb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@LeeHanEum LeeHanEum merged commit 48205bc into develop Feb 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

♻️ 자잘한 API 수정 요청사항 반영

2 participants