This repository has been archived by the owner on Feb 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
164 lines (164 loc) · 4.75 KB
/
openapi.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
openapi: 3.0.3
info:
title: GirigiriMeshi
description: |-
ギリギリで駆け込める飯屋を探してギリギリで駆け込もう
version: 0.1.0
tags:
- name: restaurant
description: Everything about nearby restaurants
paths:
/restaurants:
post:
tags:
- restaurant
summary: Search for nearby restaurant
description: Get a list of nearby restaurants from location
operationId: getRestaurants
parameters:
- name: time
required: false
in: query
schema:
type: string
format: date-time
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Location'
required: true
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Restaurant'
'500':
description: Internal server error
/restaurants/details:
parameters:
- name: placeId
in: query
description: the place id for the restaurant you want the detail of
required: true
schema:
type: string
example: ChIJeSTaRQWbImARznMsCGVeYcw
get:
tags:
- restaurant
summary: Details for restaurant
operationId: getRestaurantDetail
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/RestaurantDetail'
'500':
description: Internal server error
components:
schemas:
Location:
type: object
required:
- latitude
- longitude
properties:
latitude:
description: 緯度
type: number
format: double
example: 35.5827517
longitude:
description: 経度
type: number
format: double
example: 140.1327256
Review:
type: object
required:
- author_name
- rating
- relativeTimeDescription
- text
properties:
author_name:
type: string
description: name of the review author_name
example: Katsumi
profilePhotoUrl:
type: string
description: url to the author's profile photo
rating:
type: integer
description: rating by the user
example: 4
time:
type: string
format: date-time
description: when the review was written
text:
type: string
description: the main text of the review
example: 本当に美味しい。何か大きなイベントの前には必ず食べるし、これを食べたら何も心配ない。全て上手く行く。
Restaurant:
type: object
required:
- name
- location
- closeTime
- placeId
properties:
name:
type: string
description: name of the restaurant
example: 鐵 蘇我本店
location:
$ref: '#/components/schemas/Location'
closeTime:
type: string
format: date-time
placeId:
type: string
example: ChIJeSTaRQWbImARznMsCGVeYcw
description: This id is based on Google Places API
photoUrl:
description: Photo url. Returned on /restaurants
type: string
example: https://lh3.googleusercontent.com/places/AJDFj40BrNvrjCwyFnyutzhWTBod6mrELN7sABx13W1H2pFs0ImIqrrtBaI5n_LQBMRvqdkybqkj8qCdtNwiCbfNsgAkUbkvs5luiMA=s1600-w1000
rating:
type: number
format: double
example: 3.7
RestaurantDetail:
type: object
properties:
placeId:
type: string
example: ChIJeSTaRQWbImARznMsCGVeYcw
photoUrls:
description: Array of photoUrl. Returned on /restaurants/details?placeId=XXXX
type: array
items:
type: string
example: https://lh3.googleusercontent.com/places/AJDFj40BrNvrjCwyFnyutzhWTBod6mrELN7sABx13W1H2pFs0ImIqrrtBaI5n_LQBMRvqdkybqkj8qCdtNwiCbfNsgAkUbkvs5luiMA=s1600-w1000
reviews:
type: array
items:
$ref: '#/components/schemas/Review'
userRatingsTotal:
type: integer
description: number of user userRatingsTotal
example: 577
url:
type: string
description: Url to the page google ownes related to the page. This must be embedded if exists.
website:
type: string
description: Url to the official page of the restaurant.