From 7d29ff4f5cad1f0acee141bd5ba379965c920042 Mon Sep 17 00:00:00 2001 From: San Kim Date: Wed, 9 Oct 2024 15:11:06 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=EB=82=B4=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20=EC=A1=B0=ED=9A=8C=20API=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi.yaml | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 22ecb06..7b41eb1 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -133,6 +133,29 @@ paths: '500': $ref: '#/components/responses/InternalServerError' + /users/my: + get: + summary: 내 프로필 조회 + description: 현재 로그인한 사용자의 프로필 정보를 조회합니다. + tags: + - users + operationId: getMyUserInfo + security: + - BearerAuth: [ ] + responses: + '200': + description: 조회 성공 + content: + application/json: + schema: + $ref: '#/components/schemas/GetMyUserInfoResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '500': + $ref: '#/components/responses/InternalServerError' + /auth/token/refresh: post: summary: 액세스 토큰 갱신 @@ -339,6 +362,34 @@ components: code: "1002" message: "리소스를 찾을 수 없습니다." + Unauthorized: + description: 토큰 만료 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + unauthorized: + value: + time: "2024-05-01T00:00:00Z" + type: "AUTH" + code: "1001" + message: "인증에 실패했습니다." + + Forbidden: + description: 권한 없음 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + forbidden: + value: + time: "2024-05-01T00:00:00Z" + type: "AUTH" + code: "1002" + message: "토큰이 만료되었습니다." + InternalServerError: description: 서버 오류 content: @@ -496,6 +547,26 @@ components: - profile - desiredPartner + GetMyUserInfoResponse: + type: object + properties: + name: + type: string + description: 사용자 이름 + phoneNumber: + type: string + description: 사용자의 전화번호 (한국 휴대폰 번호 형식) + pattern: '^01[0-9]{8,9}$' + profile: + $ref: '#/components/schemas/UserProfile' + desiredPartner: + $ref: '#/components/schemas/UserDesiredPartner' + required: + - name + - phoneNumber + - profile + - desiredPartner + UserProfile: type: object description: 사용자 프로필 정보