From d8ad69a361a95025f0278a65629842c0161fcd4c Mon Sep 17 00:00:00 2001 From: lsn5963 <77337977+lsn5963@users.noreply.github.com> Date: Wed, 1 Jan 2025 17:43:05 +0900 Subject: [PATCH] =?UTF-8?q?fix/=EA=B5=AC=EA=B8=80=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/openapi.json | 203 +++++++++++++------------ 1 file changed, 109 insertions(+), 94 deletions(-) diff --git a/src/main/resources/static/openapi.json b/src/main/resources/static/openapi.json index 08cb673..0aaaebe 100644 --- a/src/main/resources/static/openapi.json +++ b/src/main/resources/static/openapi.json @@ -42,30 +42,31 @@ "/auth": { "post": { "tags": ["Auth"], - "summary": "구글 로그인", - "description": "구글 로그인을 수행합니다.", + "summary": "카카오 로그인", + "description": "카카오 로그인을 수행합니다. ID 토큰과 provider 정보를 전달받아 인증을 처리합니다.", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignInReq" + "$ref": "#/components/schemas/IdTokenReq" } } } }, "responses": { "200": { - "description": "구글 로그인 성공", + "description": "카카오 로그인 성공", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Message" + "$ref": "#/components/schemas/AuthRes" } } } }, "400": { - "description": "생성 실패", + "description": "로그인 실패", "content": { "application/json": { "schema": { @@ -800,105 +801,106 @@ }, "components": { "schemas": { - "SignInReq": { + "IdTokenReq": { "type": "object", "properties": { - "email": { + "idToken": { "type": "string", - "description": "이메일" + "description": "카카오에서 발급된 ID 토큰" }, - "providerId": { + "provider": { "type": "string", - "description": "구글 로그인 시 제공되는 providerId" + "description": "'kakao'를 입력해야 합니다.", + "example": "kakao" } }, - "required": ["token"] - }, - "CreateWriteReq": { - "type": "object", - "properties": { - "verbType": { - "type": "integer", - "description": "했어요 0, 먹었어요 1, 갔어요 2", - "example": 0 - }, - "noun": { - "type": "string", - "description": "명사", - "example": "헬스" - }, - "record_image": { - "type": "string", - "description": "기록 이미지", - "example": "#$!~@#!@#!@213123" - } + "required": ["idToken", "provider"] + }, + "CreateWriteReq": { + "type": "object", + "properties": { + "verbType": { + "type": "integer", + "description": "했어요 0, 먹었어요 1, 갔어요 2", + "example": 0 + }, + "noun": { + "type": "string", + "description": "명사", + "example": "헬스" + }, + "record_image": { + "type": "string", + "description": "기록 이미지", + "example": "#$!~@#!@#!@213123" } - }, - "RetrieveMyRecordRes": { - "properties": { - "recordNum": { - "type": "integer", - "description": "기록 생성 건수", - "example": 2 - }, - "bestRecord": { - "type": "string", - "description": "최고 연속 기록", - "example": 30 - }, - "averageRecord": { - "type": "number", - "description": "평균 일간 기록", - "example": 3.3 - }, - "dailyRecord": { - "type": "integer", - "description": "일일 최다 기록", - "example": 2 - } + } + }, + "RetrieveMyRecordRes": { + "properties": { + "recordNum": { + "type": "integer", + "description": "기록 생성 건수", + "example": 2 + }, + "bestRecord": { + "type": "string", + "description": "최고 연속 기록", + "example": 30 + }, + "averageRecord": { + "type": "number", + "description": "평균 일간 기록", + "example": 3.3 + }, + "dailyRecord": { + "type": "integer", + "description": "일일 최다 기록", + "example": 2 } - }, - "RetrieveMyCalendarRes": { - "properties": { - "myRecordDate": { - "type": "string", - "description": "기록 생성 날짜", - "example": "2024-11-23" - }, - "numRecord": { - "type": "integer", - "description": "일자별 기록 개수", - "example": 5 - } + } + }, + "RetrieveMyCalendarRes": { + "properties": { + "myRecordDate": { + "type": "string", + "description": "기록 생성 날짜", + "example": "2024-11-23" + }, + "numRecord": { + "type": "integer", + "description": "일자별 기록 개수", + "example": 5 } - }, - "RetrieveAllRecordRes": { - "properties": { - "recordNum": { - "type": "integer", - "description": "총 기록 생성 건수", - "example": 2 - }, - "bestRecord": { - "type": "string", - "description": "최고 연속 기록", - "example": 30 - }, - "averageRecord": { - "type": "number", - "description": "평균 일간 기록", - "example": 3.3 - }, - "dailyRecord": { - "type": "integer", - "description": "일일 최다 기록", - "example": 2 - } + } + }, + "RetrieveAllRecordRes": { + "properties": { + "recordNum": { + "type": "integer", + "description": "총 기록 생성 건수", + "example": 2 + }, + "bestRecord": { + "type": "string", + "description": "최고 연속 기록", + "example": 30 + }, + "averageRecord": { + "type": "number", + "description": "평균 일간 기록", + "example": 3.3 + }, + "dailyRecord": { + "type": "integer", + "description": "일일 최다 기록", + "example": 2 } - }, - "RetrieveTotalTop5ListRes": { - "properties": { - "word": { + } + }, + "RetrieveTotalTop5ListRes": { + "properties": { + "word": { "type": "string", "description": "단어", "example": "공부" @@ -1234,6 +1236,19 @@ "description": "HTTP 상태 코드" } } + }, + "AuthRes": { + "type": "object", + "properties": { + "accessToken": { + "type": "string", + "description": "'Bearer' 토큰으로 사용되는 액세스 토큰" + }, + "isRegistered": { + "type": "boolean", + "description": "사용자가 등록되었는지 여부를 나타냅니다" + } + } } } }