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 -> 주요 지역 및 하위 지역 구역 조회 API #26

Merged
merged 4 commits into from
Oct 10, 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
63 changes: 39 additions & 24 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,24 +181,48 @@ paths:
'500':
$ref: '#/components/responses/InternalServerError'

/locations:
/locations/regions:
get:
summary: 지역 검색
description: 지역 정보를 검색합니다.
summary: 지역 목록 조회
description: 시, 도 단위의 주요 행정 구역 목록을 조회합니다.
tags:
- locations
operationId: searchLocations
operationId: getLocationRegions
responses:
'200':
description: 조회 성공
content:
application/json:
schema:
$ref: '#/components/schemas/GetLocationRegionsResponse'
'500':
$ref: '#/components/responses/InternalServerError'

/locations/{regionName}:
get:
summary: 지역 목록 조회
description: 시, 도 단위의 주요 지역을 기반으로 지역을 조회합니다.
tags:
- locations
operationId: getLocationsByRegion
parameters:
- $ref: '#/components/parameters/NameQuery'
- $ref: '#/components/parameters/NextQuery'
- $ref: '#/components/parameters/LimitQuery'
- in: path
name: regionName
required: true
schema:
type: string
description: 조회할 지역의 시, 도 이름
responses:
'200':
description: 지역 검색 결과
description: 조회 성공
content:
application/json:
schema:
$ref: '#/components/schemas/SearchLocationsResponse'
type: array
items:
$ref: '#/components/schemas/Location'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'

Expand Down Expand Up @@ -660,20 +684,11 @@ components:
- refreshToken
- expiresIn

SearchLocationsResponse:
type: object
properties:
locations:
type: array
items:
$ref: '#/components/schemas/Location'
next:
type: string
format: uuid
description: 다음 페이지를 위한 키, 더 이상 결과가 없으면 null
required:
- locations
description: 위치 정보 리스트 응답
GetLocationRegionsResponse:
type: array
items:
type: string
example: [ "서울", "경기" ]

Location:
type: object
Expand All @@ -684,7 +699,7 @@ components:
example: "0191cd0e-a061-7213-b39e-51274c1e7c71"
region:
type: string
example: "서울특별시"
example: "서울"
subRegion:
type: string
example: "종로구"
Expand Down