Repository navigation
[SETTING] Swagger 초기 세팅 및 물품 상태 기준 조회 API - #5
Merged
Merged
Conversation
- springdoc-openapi-starter-webmvc-ui 3.1.1 추가 (Spring Boot 4.1 기준 빌드) - SwaggerConfig: API 정보, JWT Bearer 인증 스키마 - api-docs·swagger-ui 경로 및 정렬 설정 - Swagger 경로 인증 없이 허용, 접근 테스트 추가
- GET /api/item-conditions: ConditionGrade 기준 목록을 상태가 좋은 순으로 반환 - Swagger 요약·설명·필드 예시 작성, 기준 데이터라 JWT 요구사항 해제 - 비로그인 상태에서도 쓰도록 GET 요청 인증 없이 허용
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.
작업 내용
GET /api/item-conditions) 1개 추가Swagger
springdoc-openapi-starter-webmvc-ui:3.1.1추가SwaggerConfig: API 정보(IT:SSUM API, v1), JWT Bearer 인증 스키마 → 우측 상단 Authorize 버튼application.yml:/v3/api-docs,/swagger-ui.html, HTTP 메서드 순·태그 이름 순 정렬SecurityConfig: Swagger 경로 인증 없이 허용 (JWT 적용 후에도 유지)물품 상태 기준 조회 API
GET /api/item-conditions:ConditionGradeenum 기준 목록을 상태가 좋은 순(HIGH → MID → LOW)으로 반환ApiResponse형식, 항목은{ code, description }{"success":true,"data":[ {"code":"HIGH","description":"상·미개봉"}, {"code":"MID","description":"중·사용감 적음"}, {"code":"LOW","description":"하·다회 사용"} ]}물품, 요약·설명·필드 예시 작성@SecurityRequirements로 이 API만 전역 JWT 요구사항 해제 (자물쇠 표시 없음)SecurityConfig에서 GET 요청 허용문서
확인 사항
develop→main머지로 배포되면http://<EC2 주소>/swagger-ui.html테스트
ItemConditionControllerTest통과 (응답 형식·순서)GET /api/item-conditions→ 200, 위 응답 그대로/swagger-ui.html→/swagger-ui/index.html200/v3/api-docs에서 이 APIsecurity: [], 응답 스키마ApiResponseListItemConditionResponse확인SwaggerConfigTest(API 문서·Swagger UI 인증 없이 접근)는 이 PR의 CI에서 MySQL로 실행