Skip to content

Commit c9e12ef

Browse files
authored
Add files via upload
1 parent 24660e5 commit c9e12ef

1 file changed

Lines changed: 155 additions & 0 deletions

File tree

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"openapi" : "3.0.0",
3+
"servers" : [ {
4+
"description" : "SwaggerHub API Auto Mocking",
5+
"url" : "https://virtserver.swaggerhub.com/CORJI21/thesis/1.0.0"
6+
} ],
7+
"info" : {
8+
"description" : "This is a simple API",
9+
"version" : "1.0.0-oas3.1",
10+
"title" : "Simple Inventory API",
11+
"contact" : {
12+
"email" : "you@your-company.com"
13+
},
14+
"license" : {
15+
"name" : "Apache 2.0",
16+
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
17+
}
18+
},
19+
"tags" : [ {
20+
"name" : "admins",
21+
"description" : "Secured Admin-only calls"
22+
}, {
23+
"name" : "developers",
24+
"description" : "Operations available to regular developers"
25+
} ],
26+
"paths" : {
27+
"/inventory" : {
28+
"get" : {
29+
"tags" : [ "developers" ],
30+
"summary" : "searches inventory",
31+
"operationId" : "searchInventory",
32+
"description" : "By passing in the appropriate options, you can search for\navailable inventory in the system\n",
33+
"parameters" : [ {
34+
"in" : "query",
35+
"name" : "searchString",
36+
"description" : "pass an optional search string for looking up inventory",
37+
"required" : false,
38+
"schema" : {
39+
"type" : "string"
40+
}
41+
}, {
42+
"in" : "query",
43+
"name" : "skip",
44+
"description" : "number of records to skip for pagination",
45+
"schema" : {
46+
"type" : "integer",
47+
"format" : "int32",
48+
"minimum" : 0
49+
}
50+
}, {
51+
"in" : "query",
52+
"name" : "limit",
53+
"description" : "maximum number of records to return",
54+
"schema" : {
55+
"type" : "integer",
56+
"format" : "int32",
57+
"minimum" : 0,
58+
"maximum" : 50
59+
}
60+
} ],
61+
"responses" : {
62+
"200" : {
63+
"description" : "search results matching criteria",
64+
"content" : {
65+
"application/json" : {
66+
"schema" : {
67+
"type" : "array",
68+
"items" : {
69+
"$ref" : "#/components/schemas/InventoryItem"
70+
}
71+
}
72+
}
73+
}
74+
},
75+
"400" : {
76+
"description" : "bad input parameter"
77+
}
78+
}
79+
},
80+
"post" : {
81+
"tags" : [ "admins" ],
82+
"summary" : "adds an inventory item",
83+
"operationId" : "addInventory",
84+
"description" : "Adds an item to the system",
85+
"responses" : {
86+
"201" : {
87+
"description" : "item created"
88+
},
89+
"400" : {
90+
"description" : "invalid input, object invalid"
91+
},
92+
"409" : {
93+
"description" : "an existing item already exists"
94+
}
95+
},
96+
"requestBody" : {
97+
"content" : {
98+
"application/json" : {
99+
"schema" : {
100+
"$ref" : "#/components/schemas/InventoryItem"
101+
}
102+
}
103+
},
104+
"description" : "Inventory item to add"
105+
}
106+
}
107+
}
108+
},
109+
"components" : {
110+
"schemas" : {
111+
"InventoryItem" : {
112+
"type" : "object",
113+
"required" : [ "id", "name", "manufacturer", "releaseDate" ],
114+
"properties" : {
115+
"id" : {
116+
"type" : "string",
117+
"format" : "uuid",
118+
"example" : "d290f1ee-6c54-4b01-90e6-d701748f0851"
119+
},
120+
"name" : {
121+
"type" : "string",
122+
"example" : "Widget Adapter"
123+
},
124+
"releaseDate" : {
125+
"type" : "string",
126+
"format" : "date-time",
127+
"example" : "2016-08-29T09:12:33.001Z"
128+
},
129+
"manufacturer" : {
130+
"$ref" : "#/components/schemas/Manufacturer"
131+
}
132+
}
133+
},
134+
"Manufacturer" : {
135+
"required" : [ "name" ],
136+
"properties" : {
137+
"name" : {
138+
"type" : "string",
139+
"example" : "ACME Corporation"
140+
},
141+
"homePage" : {
142+
"type" : "string",
143+
"format" : "url",
144+
"example" : "https://www.acme-corp.com"
145+
},
146+
"phone" : {
147+
"type" : "string",
148+
"example" : "408-867-5309"
149+
}
150+
},
151+
"type" : "object"
152+
}
153+
}
154+
}
155+
}

0 commit comments

Comments
 (0)