feat: API 버전 정책 적용 — X-API-Version 헤더 협상 - #115
Merged
Merged
Conversation
경로 버전(/api/v1) 대신 헤더로 버전을 주고받는다. 프런트 호출과 SecurityConfig 인가 규칙이 전부 버전 없는 경로로 짜여 있어, 경로에 버전을 넣으면 인가 규칙을 두 벌 유지해야 한다. - ApiVersionFilter: 헤더가 없으면 현재 버전(1), 1/v1 수용, 모르는 버전은 400. 응답에 처리한 버전을 X-API-Version 으로 돌려준다. CORS 허용·노출 헤더에 추가. - BaseController 의 @RequestMapping("/api/v1") 제거. 하위 컨트롤러가 전부 덮어써 한 번도 적용된 적이 없고 "경로 버전을 쓴다" 는 오해만 낳았다. app.api.base-url 도 제거. - Swagger: 모든 API 에 선택 헤더 표시, 문서 버전 표기. - docs/reference/api-versioning.md: 결정 근거, 규칙, 호환되지 않는 변경 절차.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #44
결정
경로 버전(
/api/v1) 대신X-API-Version헤더. 근거와 절차는 docs/reference/api-versioning.md.1/v1API_VERSION_UNSUPPORTED이슈 할 일 대응
ApiVersionFilter(모든 요청), 죽은@RequestMapping("/api/v1")제거Deprecation/Sunset절차 문서화ApiVersionFilterTest,AccessControlContractTest.apiVersionHeader테스트
./gradlew test jacocoTestCoverageVerification— 522 tests, 실패 0, skip 0