[Refactor] Update minor changes in flowerSpot related Apis#96
[Refactor] Update minor changes in flowerSpot related Apis#96
Conversation
📝 WalkthroughWalkthroughThis PR refactors image handling across the AWS S3 integration and API response layers. The changes introduce Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 nullableaddressfield.The
addressfield is typed asString?(nullable) but annotated withrequiredMode = 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:
- Adding a description note that the field can be null, or
- Using
requiredMode = NOT_REQUIREDif the intent is that it's optional
🌱 관련 이슈
📌 작업 내용 및 특이 사항
📝 참고
📌 체크 리스트
Summary by CodeRabbit
Release Notes
New Features
Refactor