docs: Swagger 문서 Phase 2 완료 (Auth API 점검)
- AuthApi.php 응답 형식 실제 코드와 일치화
- logout: {success, message, data} → {message}
- debug-apikey: description 및 응답 형식 추가
- login API 검증 완료
- 요청/응답 스키마와 실제 코드 일치 확인
- user, tenant, menus 구조 정확성 검증
- signup API 중복 확인
- AuthApi.php와 RegisterApi.php 동일 엔드포인트
- RegisterApi.php가 더 상세 (테넌트 생성 포함)
- SWAGGER_AUDIT.md 업데이트
- Phase 2 완료 상태로 변경
- 발견 이슈 4건 추가 (모두 해결)
This commit is contained in:
@@ -55,9 +55,19 @@ class AuthApi
|
||||
* path="/api/v1/debug-apikey",
|
||||
* tags={"Auth"},
|
||||
* summary="API Key 인증 확인",
|
||||
* description="API Key가 유효한지 확인합니다. Bearer 토큰은 선택사항입니다.",
|
||||
* security={{"ApiKeyAuth": {}}, {"BearerAuth": {}}},
|
||||
*
|
||||
* @OA\Response(response=200, description="API Key 인증 성공"),
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="API Key 인증 성공",
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
*
|
||||
* @OA\Property(property="message", type="string", example="API Key 인증 성공")
|
||||
* )
|
||||
* ),
|
||||
*
|
||||
* @OA\Response(response=401, description="인증 실패", @OA\JsonContent(ref="#/components/schemas/ErrorResponse"))
|
||||
* )
|
||||
*/
|
||||
@@ -189,9 +199,7 @@ public function login() {}
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
*
|
||||
* @OA\Property(property="success", type="boolean", example=true),
|
||||
* @OA\Property(property="message", type="string", example="로그아웃 성공"),
|
||||
* @OA\Property(property="data", type="null", example=null)
|
||||
* @OA\Property(property="message", type="string", example="로그아웃 완료")
|
||||
* )
|
||||
* ),
|
||||
*
|
||||
|
||||
@@ -25,14 +25,27 @@ #### 수정 내용:
|
||||
- .env 파일의 L5_SWAGGER_CONST_HOST 변수로 관리
|
||||
- 사용자가 직접 수정 예정 (http://api.sam.kr/ → https://api.codebridge-x.com)
|
||||
|
||||
### Phase 2: Auth API 상세 점검 (예정)
|
||||
### Phase 2: Auth API 상세 점검 (완료 ✅)
|
||||
**완료일:** 2025-11-06
|
||||
**대상 파일:** AuthApi.php
|
||||
**점검 항목:**
|
||||
- [ ] login API 요청/응답 스키마와 실제 값 일치성
|
||||
- [ ] logout API 요청/응답 검증
|
||||
- [ ] signup API 검증 (AuthApi와 RegisterApi 중복 확인)
|
||||
- [ ] debug-apikey API 검증
|
||||
- [ ] 각 엔드포인트별 예시 값 추가
|
||||
|
||||
#### 수정 내용:
|
||||
1. ✅ **debug-apikey API 개선**
|
||||
- description 추가 (API Key 유효성 확인 설명)
|
||||
- 응답 형식 명시 (`{message: "API Key 인증 성공"}`)
|
||||
|
||||
2. ✅ **logout API 응답 형식 수정**
|
||||
- Swagger: `{success, message, data}` → 실제: `{message}`
|
||||
- 실제 코드와 일치하도록 수정
|
||||
|
||||
3. ✅ **login API 검증**
|
||||
- 요청/응답 스키마와 실제 코드 일치 확인
|
||||
- user, tenant, menus 구조 정확성 확인
|
||||
|
||||
4. ✅ **signup API 중복 확인**
|
||||
- AuthApi.php와 RegisterApi.php가 동일 엔드포인트
|
||||
- RegisterApi.php가 더 상세 (테넌트 생성 포함)
|
||||
- 두 파일 모두 유지 (태그 및 구조 차이)
|
||||
|
||||
### Phase 3: 리소스별 순차 점검 (예정)
|
||||
**총 30개 파일 중 28개 남음**
|
||||
@@ -115,6 +128,17 @@ ### 해결됨 (✅)
|
||||
- 해결: 상세한 설명 및 예시 추가
|
||||
- 완료일: 2025-11-06
|
||||
|
||||
3. **AuthApi.php - logout 응답 형식 불일치**
|
||||
- 문제: Swagger `{success, message, data}` vs 실제 `{message}`
|
||||
- 원인: Swagger 문서가 표준 응답 형식으로 작성됨
|
||||
- 해결: 실제 코드에 맞춰 `{message}` 형식으로 수정
|
||||
- 완료일: 2025-11-06
|
||||
|
||||
4. **AuthApi.php - debug-apikey 설명 부족**
|
||||
- 문제: 응답 형식 미명시
|
||||
- 해결: description 및 응답 형식 추가
|
||||
- 완료일: 2025-11-06
|
||||
|
||||
### 진행 중 (🔄)
|
||||
없음
|
||||
|
||||
@@ -129,7 +153,7 @@ ## 📊 진행 상황
|
||||
|
||||
### 전체 진도
|
||||
- **Phase 1:** ✅ 완료 (3/3)
|
||||
- **Phase 2:** ⏳ 대기 중 (0/4)
|
||||
- **Phase 2:** ✅ 완료 (4/4)
|
||||
- **Phase 3:** ⏳ 대기 중 (0/28)
|
||||
|
||||
### 파일별 상태
|
||||
@@ -137,7 +161,7 @@ ### 파일별 상태
|
||||
|--------|------|--------|------|
|
||||
| SAMInfo.php | ✅ 완료 | 2025-11-06 | Auth 태그 개선 |
|
||||
| RegisterApi.php | ✅ 완료 | 2025-11-06 | 보안 어노테이션 추가 |
|
||||
| AuthApi.php | ⏳ 대기 | - | Phase 2 |
|
||||
| AuthApi.php | ✅ 완료 | 2025-11-06 | logout/debug-apikey 수정 |
|
||||
| ProductApi.php | ⏳ 대기 | - | Phase 3 (우선순위 높음) |
|
||||
| MaterialApi.php | ⏳ 대기 | - | Phase 3 (우선순위 높음) |
|
||||
| ... | ... | ... | ... |
|
||||
|
||||
Reference in New Issue
Block a user