-
Notifications
You must be signed in to change notification settings - Fork 1
/
create_restaurant.yml
66 lines (65 loc) · 1.41 KB
/
create_restaurant.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
66
Add a new restaurant to the database
---
tags:
- name: Restaurants
description: A JSON request to create a restaurant
consumes:
- application/json
produces:
- application/json
parameters:
- in: header
name: Authorization
type: string
required: true
description: Access token
- in: body
name: body
description: Restaurant info to set in the database
required: true
schema:
type: object
required:
- name
- ranking
- chef
- abstract
- public_access
- city
properties:
name:
type: string
ranking:
type: integer
format: int32
chef:
type: string
abstract:
type: string
public_access:
type: boolean
city:
type: integer
format: int32
example:
{name: Nola, ranking: 16, chef: Luciano Rivarola,
abstract: Perfect flavour for a summer night,
public_access: true, city: 13}
security:
- jwtAuth: []
responses:
202:
description: Successful operation
400:
description: Missing or invalid parameters
401:
description: Unauthorized
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