Skip to content

Commit

Permalink
✨ 내 프로필 조회 API 명세 (#23)
Browse files Browse the repository at this point in the history
* ✨ 내 프로필 조회 API 구현

* 🩹 인증 예외응답 리뷰 반영

* 🩹 리뷰 반영
  • Loading branch information
waterfogSW authored Oct 9, 2024
1 parent 193eda2 commit 6676694
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,27 @@ 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'
'500':
$ref: '#/components/responses/InternalServerError'

/auth/token/refresh:
post:
summary: 액세스 토큰 갱신
Expand Down Expand Up @@ -339,6 +360,26 @@ components:
code: "1002"
message: "리소스를 찾을 수 없습니다."

Unauthorized:
description: 인증 실패 (토큰 만료 또는 유효하지 않은 토큰)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
tokenExpired:
value:
time: "2024-05-01T00:00:00Z"
type: "AUTH"
code: "1001"
message: "토큰이 만료되었습니다."
invalidToken:
value:
time: "2024-05-01T00:00:00Z"
type: "AUTH"
code: "1002"
message: "유효하지 않은 토큰입니다."

InternalServerError:
description: 서버 오류
content:
Expand Down Expand Up @@ -496,6 +537,30 @@ components:
- profile
- desiredPartner

GetMyUserInfoResponse:
type: object
properties:
id:
type: string
format: uuid
description: 사용자 식별자
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: 사용자 프로필 정보
Expand Down

0 comments on commit 6676694

Please sign in to comment.