-
Notifications
You must be signed in to change notification settings - Fork 23
/
swagger.yaml
109 lines (109 loc) · 2.46 KB
/
swagger.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
swagger: '2.0'
info:
title: 'Beer Catalog API'
description: 'An API for querying beer catalog of Acme Inc.'
contact:
name: 'Laurent Broudoux'
url: 'http://github.com/lbroudoux'
email: laurent.broudoux@gmail.com
license:
name: 'MIT License'
url: 'https://opensource.org/licenses/MIT'
version: '0.9'
basePath: "/api"
paths:
'/beer/{name}':
get:
tags:
- beer
summary: 'Get beer having name'
description: 'Get beer having name'
operationId: GetBeer
responses:
'200':
description: 'Beer having requested name'
schema:
$ref: '#/definitions/Beer'
parameters:
-
name: name
in: path
description: 'Name of beer to retrieve'
required: true
type: string
'/beer/findByStatus/{status}':
get:
tags:
- beer
summary: 'Get beers having status'
description: 'Get beers having status'
operationId: FindBeersByStatus
responses:
'200':
description: 'List of beers having requested status'
schema:
type: array
items:
$ref: '#/definitions/Beer'
parameters:
-
name: status
in: path
description: 'Status of beers to retrieve'
required: true
type: string
-
name: page
in: query
description: 'Number of page to retrieve'
type: number
/beer:
get:
tags:
- beer
summary: 'List beers within catalog'
description: 'List beers within catalog'
operationId: ListBeers
responses:
'200':
description: 'Array of beers'
schema:
type: array
items:
$ref: '#/definitions/Beer'
parameters:
-
name: page
in: query
description: 'Number of page to retrieve'
type: number
tags:
-
name: beer
description: 'Beer resource'
definitions:
Beer:
properties:
name:
description: 'Name of Beer'
type: string
country:
description: 'Origin country of Beer'
type: string
type:
description: 'Type of Beer'
type: string
rating:
description: 'Rating from customers'
type: number
status:
description: 'Stock status'
type: string
securityDefinitions:
api-key:
type: apiKey
name: api-key
in: header
security:
-
api-key: []