This repository has been archived by the owner on Jul 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yml
144 lines (143 loc) · 3.79 KB
/
swagger.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
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
openapi: 3.0.0
info:
title: Simple Inventory API
description: This is a simple API
contact:
email: [email protected]
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: https://virtserver.swaggerhub.com/tredfield/sample-api/1.0.0
description: SwaggerHub API Auto Mocking
tags:
- name: inventory
description: inventory calls
paths:
/inventory:
get:
tags:
- inventory
summary: searches inventory
description: |
By passing in the appropriate options, you can search for
available inventory in the system
operationId: searchInventory
parameters:
- name: searchString
in: query
description: pass an optional search string for looking up inventory
required: false
style: form
explode: true
schema:
type: string
- name: skip
in: query
description: number of records to skip for pagination
required: false
style: form
explode: true
schema:
minimum: 0
type: integer
format: int32
- name: limit
in: query
description: maximum number of records to return
required: false
style: form
explode: true
schema:
maximum: 50
minimum: 0
type: integer
format: int32
responses:
200:
description: search results matching criteria
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/InventoryItem'
400:
description: bad input parameter
x-amazon-apigateway-integration:
uri:
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${SearchInventoryDemo.Arn}/invocations
responses:
default:
statusCode: "200"
passthroughBehavior: when_no_match
httpMethod: POST
contentHandling: CONVERT_TO_TEXT
type: aws_proxy
post:
tags:
- inventory
summary: adds an inventory item
description: Adds an item to the system
operationId: addInventory
requestBody:
description: Inventory item to add
content:
application/json:
schema:
$ref: '#/components/schemas/InventoryItem'
responses:
201:
description: item created
400:
description: invalid input, object invalid
409:
description: an existing item already exists
x-amazon-apigateway-integration:
uri:
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${AddInventoryDemo.Arn}/invocations
responses:
default:
statusCode: "200"
passthroughBehavior: when_no_match
httpMethod: POST
contentHandling: CONVERT_TO_TEXT
type: aws_proxy
components:
schemas:
InventoryItem:
required:
- id
- manufacturer
- name
- releaseDate
type: object
properties:
id:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
name:
type: string
example: Widget Adapter
releaseDate:
type: string
format: date-time
manufacturer:
$ref: '#/components/schemas/Manufacturer'
Manufacturer:
required:
- name
type: object
properties:
name:
type: string
example: ACME Corporation
homePage:
type: string
format: url
example: https://www.acme-corp.com
phone:
type: string
example: 408-867-5309