-
Notifications
You must be signed in to change notification settings - Fork 0
♻️refactor : 노선도 상세 설명 수정 #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
The head ref may contain hidden characters: "feat/\uB300\uC911\uAD50\uD1B5-\uC218\uC815"
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1143784
♻️refactor : 노선도 상세 설명 수정
doup2001 04f90ad
Merge branch 'develop' into feat/대중교통-수정
doup2001 1d55213
♻️refactor : 노선도 노선 명 나오는 부분 수정
doup2001 fcdffc4
♻️refactor : 노선도 색깔 수정
doup2001 c72dba2
♻️refactor : 변수명 수정
doup2001 a948c6f
♻️refactor : 변수명 수정 (2)
doup2001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
141 changes: 141 additions & 0 deletions
141
...House/server/platform/housing/complex/application/dto/response/TransitRoutesResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| package com.pinHouse.server.platform.housing.complex.application.dto.response; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.pinHouse.server.platform.housing.complex.application.dto.result.LineInfo; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import lombok.Builder; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * 대중교통 경로 응답 (3개 경로 한 번에 제공) | ||
| */ | ||
| @Builder | ||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| @Schema(name = "[응답][대중교통] 전체 경로 응답", description = "3개의 대중교통 경로를 한 번에 제공하는 응답 DTO") | ||
| public record TransitRoutesResponse( | ||
|
|
||
| @Schema(description = "전체 경로 개수", example = "3") | ||
| int totalCount, | ||
|
|
||
| @Schema(description = "경로 리스트 (최대 3개)") | ||
| List<RouteResponse> routes | ||
| ) { | ||
|
|
||
| /** | ||
| * 개별 경로 정보 | ||
| */ | ||
| @Builder | ||
| @Schema(name = "[응답][대중교통] 개별 경로", description = "하나의 대중교통 경로 정보") | ||
| public record RouteResponse( | ||
|
|
||
| @Schema(description = "경로 인덱스 (0부터 시작)", example = "0") | ||
| int routeIndex, | ||
|
|
||
| @Schema(description = "경로 요약 정보") | ||
| SummaryResponse summary, | ||
|
|
||
| @Schema(description = "색 막대용 구간 정보 배열") | ||
| List<SegmentResponse> distance, | ||
|
|
||
| @Schema(description = "세부 경로 단계 배열 (색깔 + 승차/하차 + 소요시간 모두 포함)") | ||
| List<StepResponse> steps | ||
| ) { | ||
| } | ||
|
|
||
| /** | ||
| * 경로 요약 정보 | ||
| */ | ||
| @Builder | ||
| @Schema(name = "[응답][대중교통] 경로 요약", description = "총 시간, 거리, 요금, 환승 횟수") | ||
| public record SummaryResponse( | ||
|
|
||
| @Schema(description = "총 소요 시간(분)", example = "83") | ||
| int totalMinutes, | ||
|
|
||
| @Schema(description = "총 거리(km)", example = "39.6") | ||
| double totalDistanceKm, | ||
|
|
||
| @Schema(description = "총 요금(원), 없으면 null", example = "1350") | ||
| Integer totalFareWon, | ||
|
|
||
| @Schema(description = "환승 횟수", example = "1") | ||
| int transferCount, | ||
|
|
||
| @Schema(description = "UI 표시용 시간 텍스트", example = "1시간 23분") | ||
| String displayText | ||
| ) { | ||
| } | ||
|
|
||
| /** | ||
| * 색 막대용 구간 정보 | ||
| */ | ||
| @Builder | ||
| @Schema(name = "[응답][대중교통] 세그먼트", description = "색 막대 렌더링용 구간 정보") | ||
| public record SegmentResponse( | ||
|
|
||
| @Schema(description = "이동 수단 (WALK, BUS, SUBWAY, TRAIN, AIR)", example = "SUBWAY") | ||
| String type, | ||
|
|
||
| @Schema(description = "소요 시간(분)", example = "65") | ||
| int minutes, | ||
|
|
||
| @Schema(description = "막대 위 표시 텍스트", example = "65분") | ||
| String minutesText, | ||
|
|
||
| @Schema(description = "구간 색상(Hex)", example = "#3356B4") | ||
| String colorHex, | ||
|
|
||
| @Schema(description = "노선 정보 (WALK면 null)") | ||
| LineInfo line | ||
| ) {} | ||
|
|
||
| /** | ||
| * 세부 경로 단계 (색깔 + 승차/하차 + 시간 정보 통합) | ||
| */ | ||
| @Builder | ||
| @Schema(name = "[응답][대중교통] 단계", description = "세부 경로 단계 (색깔 + 승차/하차/도보 등 모든 정보 포함)") | ||
| public record StepResponse( | ||
|
|
||
| @Schema(description = "단계 인덱스 (0부터 시작)", example = "0") | ||
| int stepIndex, | ||
|
|
||
| @Schema(description = "행동 타입 (DEPART, WALK, BOARD, ALIGHT, ARRIVE)", example = "BOARD") | ||
| StepAction action, | ||
|
|
||
| @Schema(description = "이동 수단 (WALK, BUS, SUBWAY, TRAIN, AIR, null)", example = "SUBWAY") | ||
| String type, | ||
|
|
||
| @Schema(description = "정류장/역 이름", example = "시청역") | ||
| String stopName, | ||
|
|
||
| @Schema(description = "주 텍스트 (UI에 굵게 표시)", example = "시청역 승차") | ||
| String primaryText, | ||
|
|
||
| @Schema(description = "부 텍스트 (노선명, 방면 등)", example = "수도권 1호선") | ||
| @JsonIgnore | ||
| String secondaryText, | ||
|
|
||
| @Schema(description = "해당 구간 소요 시간(분), 없으면 null", example = "65") | ||
| Integer minutes, | ||
|
|
||
| @Schema(description = "색 막대용 색상(Hex), 출발/도착은 null", example = "#3356B4") | ||
| String colorHex, | ||
|
|
||
| @Schema(description = "노선 정보 (WALK면 null)") | ||
| LineInfo line | ||
| ) { | ||
| } | ||
|
|
||
| /** | ||
| * 단계 행동 타입 | ||
| */ | ||
| public enum StepAction { | ||
| DEPART, // 출발 | ||
| WALK, // 도보 | ||
| BOARD, // 승차 | ||
| ALIGHT, // 하차 | ||
| ARRIVE // 도착 | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JsonIgnore와@Schema가 동시에 적용되어 있습니다.secondaryText필드에@JsonIgnore가 적용되어 직렬화되지 않지만,@Schema로 Swagger 문서에는 표시됩니다. 이는 API 문서와 실제 응답 간 불일치를 유발합니다.의도적으로 클라이언트에 노출하지 않으려면
@Schema(hidden = true)를 사용하거나, 노출해야 한다면@JsonIgnore를 제거하세요.@Schema(description = "부 텍스트 (노선명, 방면 등)", example = "수도권 1호선") - @JsonIgnore String secondaryText,또는 문서에서도 숨기려면:
📝 Committable suggestion
🤖 Prompt for AI Agents