-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Expand file tree
/
Copy pathCatalog.API.http
More file actions
53 lines (32 loc) · 1016 Bytes
/
Catalog.API.http
File metadata and controls
53 lines (32 loc) · 1016 Bytes
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
@HostAddress = http://localhost:5222
@ApiVersion = 1.0
GET {{HostAddress}}/openapi/v1.json
###
GET {{HostAddress}}/openapi/v2.json
###
# Scalar: http://localhost:5222/scalar/v1
###
# api-version is required, so this request will fail
GET {{HostAddress}}/api/catalog/items
###
GET {{HostAddress}}/api/catalog/items?api-version={{ApiVersion}}
###
GET {{HostAddress}}/api/catalog/items/type/1/brand/2?api-version={{ApiVersion}}
###
# A request with an unknown API version returns a 400 ProblemDetails response
GET {{HostAddress}}/api/catalog/items/463/pic?api-version=99
###
# A request with an unknown item id returns a 404 NotFound with empty response body
GET {{HostAddress}}/api/catalog/items/463/pic?api-version={{ApiVersion}}
###
PUT {{HostAddress}}/api/catalog/items?api-version={{ApiVersion}}
content-type: application/json
{
"id": 999,
"name": "Item1",
"price": 100,
"description": "Description1",
"pictureFileName": "item1.png",
"catalogTypeId": 1,
"catalogBrandId": 2
}