Skip to content

Commit

Permalink
Merge pull request #246 from boostcampwm-2021/develop
Browse files Browse the repository at this point in the history
[Docs] swagger update
  • Loading branch information
waterdrag0n authored Dec 2, 2021
2 parents 0e99cb3 + 84b4311 commit 988b344
Show file tree
Hide file tree
Showing 13 changed files with 181 additions and 256 deletions.
64 changes: 64 additions & 0 deletions backend/src/swagger/components/auth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
components:
parameters:
GetScheduleParam:
- name: team_id
in: query
required: true
description: 대상 팀 id
schema:
type: integer
- name: start_date
in: query
required: true
description: 시작 날짜
schema:
type: string
- name: end_date
in: query
required: true
description: 끝 날짜
schema:
type: string
ScheduleId:
- name: schedule_id
in: path
required: true
description: shedule id
schema:
type: integer
schemas:
login:
type: object
properties:
userEmail:
type: string
userPassword:
type: string
example:
userEmail: [email protected]
userPassword: 1qwrj1233ssd
signup:
type: object
properties:
userName:
type: string
userEmail:
type: string
userPassword:
type: string
example:
userName: testName
userEmail: [email protected]
userPassword: 1qwrj1233ssd
loginRes:
type: object
properties:
user:
type: object
signupRes:
type: object
properties:
signup:
type: boolean
example:
signup: true
72 changes: 0 additions & 72 deletions backend/src/swagger/components/chat.yaml

This file was deleted.

7 changes: 5 additions & 2 deletions backend/src/swagger/components/schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ components:
parameters:
GetScheduleParam:
- name: team_id
in: path
in: query
required: true
description: 대상 팀 id
schema:
Expand All @@ -20,7 +20,7 @@ components:
schema:
type: string
ScheduleId:
- name: schdule_id
- name: schedule_id
in: path
required: true
description: shedule id
Expand Down Expand Up @@ -132,6 +132,8 @@ components:
CreateScheduleBody:
type: object
properties:
team_id:
type: integer
title:
type: string
start_date:
Expand All @@ -147,6 +149,7 @@ components:
color:
type: integer
example:
team_id: 1
title: 매일 5번 반복
start_date: 2021-11-01T03:00:00.000Z
end_date: 2021-11-01T04:00:00.000Z
Expand Down
11 changes: 11 additions & 0 deletions backend/src/swagger/components/team.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ components:
required: true
schema:
type: integer
TeamUser:
- name: userId
in: path
required: true
schema:
type: integer
- name: teamId
in: path
required: true
schema:
type: integer
schemas:
TeamList:
type: array
Expand Down
15 changes: 5 additions & 10 deletions backend/src/swagger/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ info:
license:
name: MIT
servers:
- url: http://localhost:4000/
- url: https://www.boostteams.kro.kr
description: BoostTeams Server
tags:
- name: auth
description: Join / Login / Logout
- name: chat
description: Chat Page
- name: schedule
description: Calendar Page
- name: team
Expand All @@ -31,16 +29,13 @@ paths:
$ref: './paths/auth/signup.yaml'
/api/auth/info:
$ref: './paths/auth/info.yaml'
# schdule
/api/schedules/{team_id}:
/api/auth/signout:
$ref: './paths/auth/signout.yaml'
# schedule
/api/schedules:
$ref: './paths/schedule/scheduleByTeamId.yaml'
/api/schedules/{schedule_id}:
$ref: './paths/schedule/scheduleByScheduleId.yaml'
# chat
/api/chat/room:
$ref: './paths/chat/chat.yaml'
/api/chat/room/{chatRoomId}:
$ref: './paths/chat/chatRoom.yaml'
# user
/api/users:
$ref: './paths/user/user.yaml'
Expand Down
4 changes: 4 additions & 0 deletions backend/src/swagger/paths/auth/info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ get:
responses:
200:
description: 성공
content:
application/json:
schema:
$ref: '../../components/auth.yaml#/components/schemas/loginRes'
401:
description: error
9 changes: 9 additions & 0 deletions backend/src/swagger/paths/auth/login.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
post:
summary: 로그인하기
tags: [auth]
requestBody:
content:
application/json:
schema:
$ref: '../../components/auth.yaml#/components/schemas/login'
responses:
200:
description: 성공
content:
application/json:
schema:
$ref: '../../components/auth.yaml#/components/schemas/loginRes'
401:
description: error
8 changes: 8 additions & 0 deletions backend/src/swagger/paths/auth/signout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
get:
summary: 회원 탈퇴
tags: [auth]
responses:
204:
description: 성공
401:
description: error
9 changes: 9 additions & 0 deletions backend/src/swagger/paths/auth/signup.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
post:
summary: 회원가입하기
tags: [auth]
requestBody:
content:
application/json:
schema:
$ref: '../../components/auth.yaml#/components/schemas/signup'
responses:
200:
description: 성공
content:
application/json:
schema:
$ref: '../../components/auth.yaml#/components/schemas/signupRes'
409:
description: error
31 changes: 0 additions & 31 deletions backend/src/swagger/paths/chat/chat.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions backend/src/swagger/paths/chat/chatRoom.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions backend/src/swagger/paths/schedule/scheduleByTeamId.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ get:
post:
summary: 일정 추가하기
tags: [schedule]
parameters:
- name: team_id
in: path
required: true
description: 대상 팀 id
schema:
type: integer
requestBody:
content:
application/json:
Expand Down
Loading

0 comments on commit 988b344

Please sign in to comment.