Skip to content

[admin] datagsm 프로젝트 등록 시 SDK base-url 누락 및 응답 래퍼 미해제 버그 수정#93

Merged
ZaMan0806 merged 3 commits into
developfrom
fix/datagsm-approve-baseurl-response
Jun 10, 2026
Merged

[admin] datagsm 프로젝트 등록 시 SDK base-url 누락 및 응답 래퍼 미해제 버그 수정#93
ZaMan0806 merged 3 commits into
developfrom
fix/datagsm-approve-baseurl-response

Conversation

@ZaMan0806

Copy link
Copy Markdown
Collaborator

개요

프로젝트 승인(PATCH /api/v2/admin/approve/{id}) 시 datagsm 연동에서 발생하던 두 가지 버그를 수정합니다. base-url 미지정으로 SDK가 운영 서버를 호출해 401이 발생하던 문제와, 생성 응답의 data 래퍼를 풀지 못해 id 추출에 실패하던 문제를 함께 해결합니다.

작업 내용

  • DataGsmOpenApiConfig: DataGsmOpenApiClient.builder(apiKey)baseUrl을 명시하도록 수정. 미지정 시 SDK 기본값(운영 openapi.datagsm.kr)으로 호출되어, stage 환경에서 stage 키로 운영 서버를 치며 유효하지 않은 API Key 401이 발생하던 문제를 해결
  • DatagsmApiResponse<T> 공통 응답 래퍼 DTO 추가 (status/code/message/data) — datagsm OpenAPI가 모든 응답을 data로 감싸는 구조에 대응
  • DatagsmApiClient.createProject 반환 타입을 DatagsmApiResponse<DatagsmProjectResDto>로 변경
  • AdminApproveProjectService.registerToDatagsm에서 response.getData().getId()로 id를 추출하도록 수정 — 기존에는 최상위에서 id를 찾아 항상 null이 되어 "응답에 id가 없습니다" 예외가 발생

체크리스트

  • 로컬에서 정상적으로 빌드 및 실행이 되는지 확인했습니다.
  • 코드 컨벤션(포맷팅, 네이밍 등)을 준수했습니다.
  • 불필요한 주석, 디버그 로그, 임시 코드를 제거했습니다.

기타

  • 프로파일 설정(base-url 등)은 환경변수/Secret으로 관리되므로 application-*.yml 변경은 포함하지 않았습니다. stage/prod의 spring.cloud.datagsm.openapi.base-url 프로퍼티(끝 슬래시 없는 stage/prod OpenAPI 주소)는 별도로 Secret에 추가가 필요합니다.
  • getClubs/getStudents의 Feign DTO도 동일하게 data 래퍼를 풀지 않고 있어, 해당 응답이 래퍼 구조라면 잠재 버그가 남아 있습니다. SDK에 이미 조회 메서드가 존재하므로 후속 PR에서 Feign → SDK 전환으로 정리하는 것을 권장합니다.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a generic response wrapper, DatagsmApiResponse, to handle standard response formats from the DataGSM OpenAPI. The DatagsmApiClient and AdminApproveProjectService have been updated to utilize this wrapper when creating projects. The review feedback suggests improving error handling in AdminApproveProjectService by extracting and including the specific error message from the API response (response.getMessage()) in the thrown exception to facilitate better debugging.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@ZaMan0806 ZaMan0806 merged commit f6b0f62 into develop Jun 10, 2026
1 check passed
@ZaMan0806 ZaMan0806 deleted the fix/datagsm-approve-baseurl-response branch June 10, 2026 14:13
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.

3 participants