1+ openapi : 3.0.0
2+ info :
3+ description : This is a simple API
4+ version : " 1.0.0"
5+ title : Simple Inventory API
6+ contact :
7+ 8+ license :
9+ name : Apache 2.0
10+ url : ' http://www.apache.org/licenses/LICENSE-2.0.html'
11+ tags :
12+ - name : admins
13+ description : Secured Admin-only calls
14+ - name : developers
15+ description : Operations available to regular developers
16+ paths :
17+ /inventory :
18+ get :
19+ tags :
20+ - developers
21+ summary : searches inventory
22+ operationId : searchInventory
23+ description : |
24+ By passing in the appropriate options, you can search for
25+ available inventory in the system
26+ parameters :
27+ - in : query
28+ name : searchString
29+ description : pass an optional search string for looking up inventory
30+ required : false
31+ schema :
32+ type : string
33+ - in : query
34+ name : skip
35+ description : number of records to skip for pagination
36+ schema :
37+ type : integer
38+ format : int32
39+ minimum : 0
40+ - in : query
41+ name : limit
42+ description : maximum number of records to return
43+ schema :
44+ type : integer
45+ format : int32
46+ minimum : 0
47+ maximum : 50
48+ responses :
49+ ' 200 ' :
50+ description : search results matching criteria
51+ content :
52+ application/json :
53+ schema :
54+ type : array
55+ items :
56+ $ref : ' #/components/schemas/InventoryItem'
57+ ' 400 ' :
58+ description : bad input parameter
59+ post :
60+ tags :
61+ - admins
62+ summary : adds an inventory item
63+ operationId : addInventory
64+ description : Adds an item to the system
65+ responses :
66+ ' 201 ' :
67+ description : item created
68+ ' 400 ' :
69+ description : ' invalid input, object invalid'
70+ ' 409 ' :
71+ description : an existing item already exists
72+ requestBody :
73+ content :
74+ application/json :
75+ schema :
76+ $ref : ' #/components/schemas/InventoryItem'
77+ description : Inventory item to add
78+ components :
79+ schemas :
80+ InventoryItem :
81+ type : object
82+ required :
83+ - id
84+ - name
85+ - manufacturer
86+ - releaseDate
87+ properties :
88+ id :
89+ type : string
90+ format : uuid
91+ example : d290f1ee-6c54-4b01-90e6-d701748f0851
92+ name :
93+ type : string
94+ example : Widget Adapter
95+ releaseDate :
96+ type : string
97+ format : date-time
98+ example : ' 2016-08-29T09:12:33.001Z'
99+ manufacturer :
100+ $ref : ' #/components/schemas/Manufacturer'
101+ Manufacturer :
102+ required :
103+ - name
104+ properties :
105+ name :
106+ type : string
107+ example : ACME Corporation
108+ homePage :
109+ type : string
110+ format : url
111+ example : ' https://www.acme-corp.com'
112+ phone :
113+ type : string
114+ example : 408-867-5309
115+ type : object
0 commit comments