Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 프로필 위젯 관련 API 구현 #30

Merged
merged 5 commits into from
Nov 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,34 @@ paths:
$ref: '#/components/responses/Unauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
/users/profileWidgets:
put:
summary: 프로필 위젯 추가 및 수정
description: 현재 사용자의 프로필 위젯을 추가 및 수정합니다.
tags:
- users
operationId: putProfileWidget
security:
- BearerAuth: [ ]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PutProfileWidgetRequest'
responses:
'200':
description: 프로필 위젯 추가/수정 성공
content:
application/json:
schema:
$ref: '#/components/schemas/PutProfileWidgetResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'500':
$ref: '#/components/responses/InternalServerError'

/auth/token/refresh:
post:
Expand Down Expand Up @@ -588,11 +616,16 @@ components:
$ref: '#/components/schemas/UserProfile'
desiredPartner:
$ref: '#/components/schemas/UserDesiredPartner'
profileWidgets:
type: array
items:
$ref: '#/components/schemas/ProfileWidget'
waterfogSW marked this conversation as resolved.
Show resolved Hide resolved
required:
- name
- phoneNumber
- profile
- desiredPartner
- profileWidgets

UserProfile:
type: object
Expand Down Expand Up @@ -787,3 +820,43 @@ components:
type: string
enum: [ ONLY_MY_AREA, INCLUDE_SURROUNDING_REGIONS, ANYWHERE ]
description: 선호하는 거리 (내 지역만, 주변 지역 포함, 어디든)

PutProfileWidgetRequest:
$ref: '#/components/schemas/ProfileWidget'

PutProfileWidgetResponse:
$ref: '#/components/schemas/ProfileWidget'

ProfileWidget:
type: object
properties:
type:
$ref: '#/components/schemas/ProfileWidgetType'
content:
type: string
description: 위젯 내용
minLength: 1
maxLength: 40
required:
- type
- content

ProfileWidgetType:
type: string
enum: [
HOBBY,
STYLE,
MBTI,
MUSIC,
BODY_TYPE,
FOOD,
MOVIE,
DRAMA,
BOOK,
TRAVEL,
DRINKING,
MARRIAGE,
RELIGION,
SMOKING,
]
description: 프로필 위젯 타입