Skip to content

Commit

Permalink
Merge pull request #150 from BookJamm/feat/place-docs-update
Browse files Browse the repository at this point in the history
Feat/place docs update
  • Loading branch information
1000chw authored Mar 11, 2024
2 parents 875d3d3 + 408ce0d commit e32dbbd
Show file tree
Hide file tree
Showing 4 changed files with 297 additions and 798 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ dist


package-lock.json

./src/swagger/swagger.yaml
# End of https://www.toptal.com/developers/gitignore/api/node
16 changes: 16 additions & 0 deletions src/swagger/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,19 @@ paths:
$ref: "./users.yaml#/~1users~1disabled"
/users/following/{targetUserId}:
$ref: "./users.yaml#/~1users~1following~1{targetUserId}"
/places:
$ref: "./places.yaml#/~1places"
/places/search:
$ref: "./places.yaml#/~1places~1search"
/places/{placeId}/reviews:
$ref: "./places.yaml#/~1places~1{placeId}~1reviews"
/places/{placeId}/activities:
$ref: "./places.yaml#/~1places~1{placeId}~1activities"
/places/{placeId}/news:
$ref: "./places.yaml#/~1places~1{placeId}~1news"
/places/{placeId}/books:
$ref: "./places.yaml#/~1places~1{placeId}~1books"
/places/{placeId}:
$ref: "./places.yaml#/~1places~1{placeId}"
/places/{placeId}/bookmarks:
$ref: "./places.yaml#/~1places~1{placeId}~1bookmarks"
280 changes: 280 additions & 0 deletions src/swagger/places.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
/places:
get:
tags:
- places
summary: 장소 가져오기
security:
- bearerAuth: []
parameters:
- in: query
name: category
required: true
schema:
type: string
description: 카테고리
- in: query
name: sortBy
required: false
schema:
type: string
description: 정렬 기준
- in: query
name: lat
required: true
schema:
type: string
description: lat
- in: query
name: lon
required: true
schema:
type: string
description: lon
- in: query
name: last
required: true
schema:
type: string
description: 마지막 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
/places/search:
get:
tags:
- places
summary: 장소 검색
security:
- bearerAuth: []
parameters:
- in: query
name: keyword
required: true
schema:
type: string
description: 검색어
- in: query
name: sortBy
required: false
schema:
type: string
description: 정렬 기준
- in: query
name: lat
required: true
schema:
type: string
description: lat
- in: query
name: lon
required: true
schema:
type: string
description: lon
- in: query
name: last
required: true
schema:
type: string
description: 마지막 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
/places/{placeId}/reviews:
get:
tags:
- places
summary: 장소 리뷰 보기
security:
- bearerAuth: []
parameters:
- in: path
name: placeId
required: true
schema:
type: integer
description: 장소 id
- in: query
name: last
required: true
schema:
type: string
description: 마지막 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
post:
tags:
- places
summary: 장소 리뷰 작성하기
security:
- bearerAuth: []
parameters:
- in: path
name: placeId
required: true
schema:
type: integer
description: 장소 id
- in: body
name: visitedAt
required: true
schema:
type: integer
description: 방문 날짜
- in: body
name: contents
required: true
schema:
type: integer
description: 리뷰 내용
- in: body
name: rating
required: true
schema:
type: integer
description: 별점
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
/places/{placeId}/activities:
get:
tags:
- places
summary: 장소 활동 보기
security:
- bearerAuth: []
parameters:
- in: path
name: placeId
required: true
schema:
type: integer
description: 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
/places/{placeId}/news:
get:
tags:
- places
summary: 장소 소식 보기
security:
- bearerAuth: []
parameters:
- in: path
name: placeId
required: true
schema:
type: integer
description: 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
/places/{placeId}/books:
get:
tags:
- places
summary: 장소에 있는 책 목록 보기
security:
- bearerAuth: []
parameters:
- in: path
name: placeId
required: true
schema:
type: integer
description: 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
/places/{placeId}:
get:
tags:
- places
summary: 장소 세부 페이지
security:
- bearerAuth: []
parameters:
- in: path
name: placeId
required: true
schema:
type: integer
description: 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
/places/{placeId}/bookmarks:
post:
tags:
- places
summary: 장소 북마크
security:
- bearerAuth: []
parameters:
- in: path
name: placeId
required: true
schema:
type: integer
description: 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
delete:
tags:
- places
summary: 장소 북마크 취소
security:
- bearerAuth: []
parameters:
- in: path
name: placeId
required: true
schema:
type: integer
description: 장소 id
responses:
"200":
$ref: "./openapi.yaml#/components/responses/successResponse"
"400":
$ref: "./openapi.yaml#/components/responses/BadRequest"
"500":
$ref: "./openapi.yaml#/components/responses/InternalServerError"
Loading

0 comments on commit e32dbbd

Please sign in to comment.