Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ dependencies {

implementation 'org.springframework.boot:spring-boot-starter-webflux'

// AWS SDK v2 for S3
implementation platform('software.amazon.awssdk:bom:2.21.0')
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:auth'
Comment on lines +52 to +55
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

latest AWS SDK for Java v2 BOM version 2024 2025

💡 Result:

Do you mean (A) the current/latest AWS SDK for Java v2 BOM version as of today (Jan 18, 2026), or (B) the latest BOM released in 2024 and the latest released in 2025?


🌐 Web query:

AWS SDK v2 2.21.0 security CVE vulnerabilities advisories

💡 Result:

Summary — AWS SDK for Java (v2) 2.21.0: known security advisories affecting that release

  • Maven listings for multiple 2.21.0 artifacts (s3, sts, sdk-core, apache-client, auth) show known CVEs in dependencies that affect that BOM/artifact set, including (as reported on Maven Repository): CVE-2024-47554, CVE-2023-41329, CVE-2025-48924 and others. See artifact pages for details per module. [1][2][3]

  • There is an open GitHub issue noting Netty dependency CVE-2023-44487 (HTTP/2 “rapid reset”) and discussion about upgrading Netty in aws-sdk-java-v2 releases; users should check whether your 2.21.0 runtime pulls an affected Netty version. [4]

Recommendation

  • Upgrade to a later aws-sdk-java-v2 release (2.33.x / 2.40.x+ as shown on Maven listings) or the latest patched version; verify updated dependency versions (Netty, etc.) in the newer release and retest. [1][2]
  • Run your dependency-vulnerability scanner (OWASP Dependency-Check / Snyk / GitHub Dependabot) against your built artifact to get the exact transitive CVE list for your environment.

Sources

  1. software.amazon.awssdk:s3 2.21.0 (Maven Repository) — vulnerability list and linked CVEs. [https://mvnrepository.com/artifact/software.amazon.awssdk/s3/2.21.0].
  2. software.amazon.awssdk:sts & sdk-core 2.21.0 (Maven Repository) — vulnerability listings. [https://mvnrepository.com/artifact/software.amazon.awssdk/sts/2.21.0] [https://mvnrepository.com/artifact/software.amazon.awssdk/sdk-core/2.21.0].
  3. software.amazon.awssdk:apache-client & auth 2.21.0 (Maven Repository) — dependency CVE listings. [https://mvnrepository.com/artifact/software.amazon.awssdk/apache-client/2.21.0] [https://mvnrepository.com/artifact/software.amazon.awssdk/auth/2.21.0].
  4. GitHub issue re: Netty dependency / CVE-2023-44487 on aws-sdk-java-v2. [https://github.com/Dependency of netty has an vulnerability CVE-2023-44487 'rapid reset' for HTTP/2 aws/aws-sdk-java-v2#4619].

If you want, I can:

  • produce the exact transitive CVE list for your project by scanning your pom/gradle coordinates, or
  • look up the fixed versions for each CVE and suggest minimal upgrades. Which would you prefer?

🌐 Web query:

AWS SDK v2 compatibility Spring Boot 3.4.3

💡 Result:

Short answer: Yes — AWS SDK for Java v2 is compatible with Spring Boot 3.4.3. Spring Cloud AWS 3.x is built on AWS SDK v2 and targets Spring Boot 3.x, so using SDK v2 (or Spring Cloud AWS 3.x which depends on it) is the recommended approach. [1][2]

Notes / pointers:

  • Spring Cloud AWS 3.x is explicitly built on AWS SDK v2. Use the 3.x awspring artifacts when integrating with Spring Boot 3.4.3. [2][3]
  • If you’re migrating from SDK v1, AWS provides a migration tool (OpenRewrite-based) to help convert code to SDK v2. [4]

Sources:

  1. Spring blog — Announcing Spring Cloud AWS 3.0.0 (built on AWS SDK v2). [2]
  2. AWSpring (spring-cloud-aws) GitHub compatibility table showing Spring Cloud AWS 3.x -> Spring Boot 3.x and use of SDK v2. [1]
  3. Spring Cloud AWS project page / compatibility notes. [3]
  4. AWS Developer Blog — Migration tool for AWS SDK for Java 2.x. [4]

AWS SDK BOM 버전 2.21.0은 여러 보안 취약점이 있어 즉시 업그레이드가 필요합니다.

버전 2.21.0은 다음을 포함하여 여러 알려진 CVE의 영향을 받습니다: CVE-2024-47554, CVE-2023-41329, CVE-2025-48924, CVE-2023-44487 (Netty HTTP/2). 버전 2.33.x 이상으로 업그레이드한 후 의존성 취약점 스캐너(OWASP Dependency-Check, Snyk, GitHub Dependabot)로 재검증하세요. Spring Boot 3.4.3과의 호환성은 문제없습니다.

🤖 Prompt for AI Agents
In `@build.gradle` around lines 52 - 55, Update the AWS SDK BOM dependency version
used for S3/auth from 'software.amazon.awssdk:bom:2.21.0' to at least 2.33.x to
remediate known CVEs; in the build.gradle block that declares implementation
platform('software.amazon.awssdk:bom:2.21.0') (alongside implementation
'software.amazon.awssdk:s3' and implementation 'software.amazon.awssdk:auth'),
bump the bom coordinate to a 2.33.x+ release and then re-run your dependency
vulnerability scanners (OWASP Dependency-Check, Snyk, Dependabot/GitHub) to
verify all transitive issues are resolved and compatible with Spring Boot 3.4.3.


// 스웨거
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.6'

Expand Down
38 changes: 38 additions & 0 deletions src/main/java/com/pinHouse/server/core/config/S3Config.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.pinHouse.server.core.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.S3Client;

/**
* AWS S3 클라이언트 설정 클래스
*/
@Configuration
public class S3Config {

@Value("${aws.s3.region}")
private String region;

@Value("${aws.s3.access-key}")
private String accessKey;

@Value("${aws.s3.secret-key}")
private String secretKey;

/**
* S3Client Bean 생성
*/
@Bean
public S3Client s3Client() {
AwsBasicCredentials credentials = AwsBasicCredentials.create(accessKey, secretKey);

return S3Client.builder()
.region(Region.of(region))
.credentialsProvider(StaticCredentialsProvider.create(credentials))
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum DiagnosisErrorCode implements ErrorCode {
// ========================
// 400 Bad Request
// ========================
BAD_REQUEST_TYPE(400_000,HttpStatus.BAD_REQUEST,"진단 입력 파라미터가 잘못되었습니다");
BAD_REQUEST_TYPE(400_000, HttpStatus.BAD_REQUEST, "진단 입력 파라미터가 잘못되었습니다"),

// ========================
// 401 Unauthorized
Expand All @@ -25,6 +25,7 @@ public enum DiagnosisErrorCode implements ErrorCode {
// ========================
// 404 Not Found
// ========================
NOT_FOUND_DIAGNOSIS(404_001, HttpStatus.NOT_FOUND, "진단 기록을 찾을 수 없습니다");


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.pinHouse.server.core.exception.code;

import com.pinHouse.server.core.response.response.ErrorCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;

/**
* 이미지 관련 예외처리 클래스입니다.
*/
@Getter
@RequiredArgsConstructor
public enum ImageErrorCode implements ErrorCode {

// ========================
// 400 Bad Request
// ========================
INVALID_FILE_TYPE(400_301, HttpStatus.BAD_REQUEST, "지원하지 않는 이미지 형식입니다. (jpg, jpeg, png, gif만 가능)"),
INVALID_FILE_EXTENSION(400_302, HttpStatus.BAD_REQUEST, "파일 확장자가 유효하지 않습니다."),
FILE_SIZE_EXCEEDED(400_303, HttpStatus.BAD_REQUEST, "파일 크기가 5MB를 초과합니다."),
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

rg -n "FILE_SIZE_EXCEEDED" --type java

Repository: PinHouse/PinHouse_BE

Length of output: 219


🏁 Script executed:

rg -n "400_303" --type java

Repository: PinHouse/PinHouse_BE

Length of output: 219


🏁 Script executed:

rg -n "FILE_SIZE|파일 크기" --type java -i

Repository: PinHouse/PinHouse_BE

Length of output: 379


FILE_SIZE_EXCEEDED 에러 코드를 제거하세요

FILE_SIZE_EXCEEDED는 정의되었지만 코드베이스에서 사용되지 않는 dead code입니다. 스웨거 문서에도 "파일 크기 전달은 필요 없으며"라고 명시되어 있어 파일 크기 유효성 검사가 제거되었음을 확인할 수 있습니다. 이 미사용 에러 코드는 제거되어야 합니다.

🤖 Prompt for AI Agents
In `@src/main/java/com/pinHouse/server/core/exception/code/ImageErrorCode.java` at
line 20, Remove the unused enum constant FILE_SIZE_EXCEEDED from ImageErrorCode
by deleting the entry FILE_SIZE_EXCEEDED(400_303, HttpStatus.BAD_REQUEST, "파일
크기가 5MB를 초과합니다.") and any trailing comma/formatting adjustments so the enum
remains syntactically correct; ensure there are no remaining references to
ImageErrorCode.FILE_SIZE_EXCEEDED elsewhere (search for FILE_SIZE_EXCEEDED) and
run tests/compile to confirm the enum compiles after removal.

INVALID_FILE_NAME(400_304, HttpStatus.BAD_REQUEST, "파일명이 유효하지 않습니다."),

// ========================
// 500 Internal Server Error
// ========================
S3_PRESIGNED_URL_GENERATION_FAILED(500_301, HttpStatus.INTERNAL_SERVER_ERROR, "이미지 업로드 URL 생성에 실패했습니다."),
S3_CLIENT_ERROR(500_302, HttpStatus.INTERNAL_SERVER_ERROR, "S3 서버와 통신 중 오류가 발생했습니다.");

/**
* 에러 코드 (고유값)
*/
private final Integer code;

/**
* HTTP 상태 코드
*/
private final HttpStatus httpStatus;

/**
* 에러 메시지
*/
private final String message;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.pinHouse.server.platform.diagnostic.diagnosis.application.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;

import java.util.List;

@Builder
@Schema(name = "[응답][진단] 추천 그룹", description = "추천 임대 유형을 공고 유형별로 묶은 정보")
public record DiagnosisRecommendationGroup(

@Schema(description = "공고 유형", example = "통합공공임대")
String noticeType,

@Schema(description = "추천 공급 유형 리스트", example = "[\"청년 특별공급\", \"신혼부부 특별공급\"]")
List<String> supplyTypes
) {

public static DiagnosisRecommendationGroup of(String noticeType, List<String> supplyTypes) {
return DiagnosisRecommendationGroup.builder()
.noticeType(noticeType)
.supplyTypes(supplyTypes)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.pinHouse.server.platform.diagnostic.diagnosis.application.dto;

import com.pinHouse.server.platform.diagnostic.rule.domain.entity.EvaluationContext;
import com.pinHouse.server.platform.diagnostic.rule.domain.entity.SupplyRentalCandidate;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@Builder
@Schema(name = "[응답][진단] 청약 진단 결과 v2", description = "추천 임대주택을 공고 유형별로 그룹화한 응답")
public record DiagnosisResponseV2(

@Schema(description = "최종 자격 여부 (추천 임대주택이 있는지 여부)", example = "true")
boolean eligible,

@Schema(description = "최종 요약 메시지", example = "추천 임대주택이 있습니다")
String decisionMessage,

@Schema(description = "추천 임대주택 후보 그룹", example = "[{\"noticeType\":\"통합공공임대\",\"supplyTypes\":[\"청년 특별공급\",\"신혼부부 특별공급\"]}]")
List<DiagnosisRecommendationGroup> recommended
) {

public static DiagnosisResponseV2 from(EvaluationContext context) {
List<SupplyRentalCandidate> candidates = context.getCurrentCandidates();

if (candidates.isEmpty()) {
return DiagnosisResponseV2.builder()
.eligible(false)
.decisionMessage("모든 조건 미충족")
.recommended(List.of())
.build();
}

Map<String, List<String>> grouped = new LinkedHashMap<>();

for (SupplyRentalCandidate candidate : candidates) {
String noticeType = candidate.noticeType().getValue();
String supplyType = candidate.supplyType().getValue();
grouped.computeIfAbsent(noticeType, k -> new ArrayList<>());
if (!grouped.get(noticeType).contains(supplyType)) {
grouped.get(noticeType).add(supplyType);
}
}

List<DiagnosisRecommendationGroup> groups = grouped.entrySet().stream()
.map(e -> DiagnosisRecommendationGroup.of(e.getKey(), e.getValue()))
.toList();

return DiagnosisResponseV2.builder()
.eligible(true)
.decisionMessage("추천 임대주택이 있습니다")
.recommended(groups)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisDetailResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisRequest;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisResponseV2;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.usecase.DiagnosisUseCase;
import com.pinHouse.server.platform.diagnostic.diagnosis.domain.repository.DiagnosisJpaRepository;
import com.pinHouse.server.platform.diagnostic.rule.domain.entity.EvaluationContext;
Expand Down Expand Up @@ -58,6 +59,17 @@ public DiagnosisResponse diagnose(UUID userId, DiagnosisRequest request) {
return DiagnosisResponse.from(context);
}

@Override
@Transactional
public DiagnosisResponseV2 diagnoseV2(UUID userId, DiagnosisRequest request) {
User user = userService.loadUser(userId);
var diagnosis = Diagnosis.of(user, request);
Diagnosis entity = repository.save(diagnosis);

EvaluationContext context = ruleChain.evaluateAll(entity);
return DiagnosisResponseV2.from(context);
}

/**
* 나의 최근 청약진단 상세 조회 (입력 정보 + 결과)
* @param userId 유저ID
Expand Down Expand Up @@ -86,4 +98,20 @@ public DiagnosisDetailResponse getDiagnoseDetail(UUID userId) {
return DiagnosisDetailResponse.from(context);
}

@Override
@Transactional(readOnly = true)
public DiagnosisResponseV2 getDiagnoseSummaryV2(UUID userId) {
User user = userService.loadUser(userId);

Diagnosis diagnosis = repository.findTopByUserOrderByCreatedAtDesc(user)
.orElse(null);

if (diagnosis == null) {
return null;
}

EvaluationContext context = ruleChain.evaluateAll(diagnosis);
return DiagnosisResponseV2.from(context);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisDetailResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisRequest;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisResponseV2;

import java.util.UUID;

Expand All @@ -11,7 +12,13 @@ public interface DiagnosisUseCase {
/// 청약 진단하기 (결과만 반환)
DiagnosisResponse diagnose(UUID userId, DiagnosisRequest request);

/// 청약 진단하기 v2 (그룹화 응답)
DiagnosisResponseV2 diagnoseV2(UUID userId, DiagnosisRequest request);

/// 최근 진단 상세 조회하기 (입력 정보 + 결과)
DiagnosisDetailResponse getDiagnoseDetail(UUID userId);

/// 청약 진단 결과 v2 (추천 그룹화)
DiagnosisResponseV2 getDiagnoseSummaryV2(UUID userId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.pinHouse.server.core.response.response.ApiResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisDetailResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisResponseV2;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.usecase.DiagnosisUseCase;
import com.pinHouse.server.platform.diagnostic.diagnosis.presentation.swagger.DiagnosisApiSpec;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisRequest;
Expand All @@ -13,7 +14,7 @@
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/v1/diagnosis")
@RequestMapping({"/v1/diagnosis", "/v2/diagnosis"})
@RequiredArgsConstructor
public class DiagnosisApi implements DiagnosisApiSpec {

Expand All @@ -36,6 +37,20 @@ public ApiResponse<DiagnosisResponse> diagnosis(@AuthenticationPrincipal Princip
return ApiResponse.ok(response);
}

/**
* 청약 진단 v2 (추천 그룹화 응답)
*/
@PostMapping(path = "", params = "v=2")
public ApiResponse<DiagnosisResponseV2> diagnosisV2(@AuthenticationPrincipal PrincipalDetails principalDetails,
@RequestBody DiagnosisRequest request) {

/// 서비스
DiagnosisResponseV2 response = service.diagnoseV2(principalDetails.getId(), request);

/// 리턴
return ApiResponse.ok(response);
}

/**
* 최근 진단 결과 상세 조회 (입력 정보 + 결과)
*
Expand All @@ -52,4 +67,14 @@ public ApiResponse<DiagnosisDetailResponse> getLatestDiagnosis(@AuthenticationPr
/// 리턴
return ApiResponse.ok(response);
}

/**
* 최근 진단 결과 v2 (추천 그룹화)
*/
@GetMapping(path = "/latest", params = "v=2")
@CheckLogin
public ApiResponse<DiagnosisResponseV2> getLatestDiagnosisV2(@AuthenticationPrincipal PrincipalDetails principalDetails) {
DiagnosisResponseV2 response = service.getDiagnoseSummaryV2(principalDetails.getId());
return ApiResponse.ok(response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisDetailResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisRequest;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisResponse;
import com.pinHouse.server.platform.diagnostic.diagnosis.application.dto.DiagnosisResponseV2;
import com.pinHouse.server.security.oauth2.domain.PrincipalDetails;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand All @@ -20,10 +21,23 @@ public interface DiagnosisApiSpec {
ApiResponse<DiagnosisResponse> diagnosis(@AuthenticationPrincipal PrincipalDetails principalDetails,
@RequestBody DiagnosisRequest requestDTO);

@Operation(
summary = "청약 진단 API v2",
description = "청약 진단을 수행하고 추천 결과를 공고 유형별로 그룹화한 v2 응답을 반환합니다."
)
ApiResponse<DiagnosisResponseV2> diagnosisV2(@AuthenticationPrincipal PrincipalDetails principalDetails,
@RequestBody DiagnosisRequest requestDTO);

@Operation(
summary = "최근 진단 결과 상세 조회 API",
description = "사용자의 최근 진단 결과를 입력 정보와 함께 상세하게 조회합니다."
)
ApiResponse<DiagnosisDetailResponse> getLatestDiagnosis(@AuthenticationPrincipal PrincipalDetails principalDetails);

@Operation(
summary = "최근 진단 결과 조회 API v2",
description = "추천 임대주택을 공고 유형별로 그룹화하여 반환합니다."
)
ApiResponse<DiagnosisResponseV2> getLatestDiagnosisV2(@AuthenticationPrincipal PrincipalDetails principalDetails);

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public record HomeNoticeListResponse(
@Schema(description = "공통 지역", example = "성남시")
String region,

@Schema(description = "목록 설명/출처", example = "진단 기반 추천")
String title,
Comment on lines +15 to +16
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, find and read the HomeNoticeListResponse.java file
fd -t f "HomeNoticeListResponse.java" | head -5

Repository: PinHouse/PinHouse_BE

Length of output: 155


🏁 Script executed:

# Search for the file more broadly
find . -name "HomeNoticeListResponse.java" -type f

Repository: PinHouse/PinHouse_BE

Length of output: 157


🏁 Script executed:

# List files in the home/application/dto directory
fd -t f . "src/main/java/com/pinHouse/server/platform/home/application/dto"

Repository: PinHouse/PinHouse_BE

Length of output: 803


🏁 Script executed:

# Read the HomeNoticeListResponse.java file
cat -n src/main/java/com/pinHouse/server/platform/home/application/dto/HomeNoticeListResponse.java

Repository: PinHouse/PinHouse_BE

Length of output: 1035


🏁 Script executed:

# Search for where HomeNoticeListResponse is instantiated or built
rg "HomeNoticeListResponse" --type java -A 3 -B 1

Repository: PinHouse/PinHouse_BE

Length of output: 13096


🏁 Script executed:

# Look at the HomeService implementation more carefully
rg -A 20 "getDeadlineApproachingNotices" src/main/java/com/pinHouse/server/platform/home/application/service/HomeService.java | head -50

Repository: PinHouse/PinHouse_BE

Length of output: 964


🏁 Script executed:

# Also check the getRecommendedNoticesByDiagnosis method
rg -A 30 "getRecommendedNoticesByDiagnosis" src/main/java/com/pinHouse/server/platform/home/application/service/HomeService.java | grep -A 10 "HomeNoticeListResponse.builder"

Repository: PinHouse/PinHouse_BE

Length of output: 359


🏁 Script executed:

# Get the exact line where title is set to null in HomeService
rg -n "\.title\(null\)" src/main/java/com/pinHouse/server/platform/home/application/service/HomeService.java

Repository: PinHouse/PinHouse_BE

Length of output: 92


🏁 Script executed:

# Also check all title assignments
rg -n "\.title\(" src/main/java/com/pinHouse/server/platform/home/application/service/HomeService.java

Repository: PinHouse/PinHouse_BE

Length of output: 205


🏁 Script executed:

# Get the full context around line 120 where title is set to null
sed -n '110,130p' src/main/java/com/pinHouse/server/platform/home/application/service/HomeService.java

Repository: PinHouse/PinHouse_BE

Length of output: 800


🏁 Script executed:

# Check if there are any other annotations or constraints on the title field in the DTO
cat -n src/main/java/com/pinHouse/server/platform/home/application/dto/HomeNoticeListResponse.java | sed -n '14,18p'

Repository: PinHouse/PinHouse_BE

Length of output: 225


title 필드를 nullable로 명시 필요

HomeService.getDeadlineApproachingNotices()에서 title을 명시적으로 null로 설정하고 있으나, 현재 @Schema 어노테이션은 nullable 여부를 표시하지 않습니다. API 계약을 명확히 하기 위해 nullable = true를 추가하세요.

수정 사항
-        `@Schema`(description = "목록 설명/출처", example = "진단 기반 추천")
+        `@Schema`(description = "목록 설명/출처", example = "진단 기반 추천", nullable = true)
         String title,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@Schema(description = "목록 설명/출처", example = "진단 기반 추천")
String title,
`@Schema`(description = "목록 설명/출처", example = "진단 기반 추천", nullable = true)
String title,
🤖 Prompt for AI Agents
In
`@src/main/java/com/pinHouse/server/platform/home/application/dto/HomeNoticeListResponse.java`
around lines 15 - 16, The Schema for the title field in HomeNoticeListResponse
should be marked nullable because HomeService.getDeadlineApproachingNotices()
sets title to null; update the `@Schema` annotation on the title field (in class
HomeNoticeListResponse) to include nullable = true so the API contract reflects
that the field can be null.


@Schema(description = "공고 목록")
List<HomeNoticeResponse> content,

Expand Down
Loading
Loading