-
Notifications
You must be signed in to change notification settings - Fork 1
/
get_cities.yml
65 lines (64 loc) · 1.39 KB
/
get_cities.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Return all cities in the database
---
tags:
- name: Cities
description: A JSON array of cities
produces:
- application/json
parameters:
- in: header
name: Authorization
type: string
required: true
description: Access token
- in: query
name: page
type: integer
required: false
minimum: 1
default: 1
description: The page number to return.
- in: query
name: limit
type: integer
required: false
minimum: 1
default: 5
description: The number of elements to return
security:
- jwtAuth: []
responses:
200:
description: Successful operation
schema:
type: object
properties:
key:
type: string
value:
type: array
items:
item:
type: object
properties:
key:
type: string
value:
type: string
example:
{cities: [{id: 16, name: Mendoza, country: 1},{id: 17, name: Medellín, country: 5}]}
400:
description: Missing or invalid parameters
401:
description: Unauthorized
404:
description: Information not found
500:
description: Server error
securityDefinitions:
jwtAuth:
type: oauth2
flow: implicit
scopes:
write:restaurants: modify restaurants in your account
read:restaurants: read public restaurants and in your account