-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathopen_api.yaml
77 lines (75 loc) · 2.36 KB
/
open_api.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
openapi: 3.0.0
info:
title: Products API
description: Products API allows access to HashiCoffee Coffees and Ingredients
version: 0.1.9
paths:
/coffees:
get:
summary: Returns a list of Coffee
responses:
'200': # status code
description: A JSON array of coffee
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
format: int64
example: 1
name:
type: string
example: "Latte"
price:
type: float
format: float64
example: 2.34
created_at:
type: datetime
example: 2020-01-10T00:00:00Z
updated_at:
type: datetime
example: 2020-01-10T00:00:00Z
deleted_at:
type: datetime
example: 2020-01-10T00:00:00Z
ingredients:
type: array
items:
type: integer
/coffees/{id}/ingredients:
get:
summary: Returns a list of ingredients for a coffee
responses:
'200': # status code
description: A JSON array of ingredients
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
format: int64
example: 1
name:
type: string
example: "Milk"
quantity:
type: string
example: 500ml
created_at:
type: datetime
example: 2020-01-10T00:00:00Z
updated_at:
type: datetime
example: 2020-01-10T00:00:00Z
deleted_at:
type: datetime
example: 2020-01-10T00:00:00Z