-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger_swagger.json
130 lines (130 loc) · 5.18 KB
/
swagger_swagger.json
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
{
"swagger": "2.0",
"info": {
"title": "Oscar Echo API",
"version": "1.0"
},
"host": "oscar-api-management-service1.azure-api.net",
"basePath": "/example",
"schemes": ["https"],
"securityDefinitions": {
"apiKeyHeader": {
"type": "apiKey",
"name": "Ocp-Apim-Subscription-Key",
"in": "header"
},
"apiKeyQuery": {
"type": "apiKey",
"name": "subscription-key",
"in": "query"
}
},
"security": [{
"apiKeyHeader": []
}, {
"apiKeyQuery": []
}],
"paths": {
"/resource": {
"get": {
"description": "A demonstration of a GET call on a sample resource. It is handled by an \"echo\" backend which returns a response equal to the request (the supplied headers and body are being returned as received).",
"operationId": "retrieve-resource",
"summary": "Retrieve resource",
"parameters": [{
"name": "param1",
"in": "query",
"description": "A sample parameter that is required and has a default value of \"sample\".",
"required": true,
"type": "string",
"default": "sample",
"enum": ["sample"]
}, {
"name": "param2",
"in": "query",
"description": "Another sample parameter, set to not required.",
"type": "number"
}],
"responses": {
"200": {
"description": "Returned in all cases."
}
}
},
"put": {
"description": "A demonstration of a PUT call handled by the same \"echo\" backend as above. You can now specify a request body in addition to headers and it will be returned as well.",
"operationId": "modify-resource",
"summary": "Modify Resource",
"responses": {
"200": {
"description": ""
}
}
},
"post": {
"description": "A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.",
"operationId": "create-resource",
"summary": "Create resource",
"parameters": [{
"name": "body",
"in": "body",
"schema": {
"example": "{\r\n\t\"vehicleType\": \"train\",\r\n\t\"maxSpeed\": 125,\r\n\t\"avgSpeed\": 90,\r\n\t\"speedUnit\": \"mph\"\r\n}"
}
}],
"consumes": ["application/json"],
"responses": {
"200": {
"description": ""
}
}
},
"delete": {
"description": "A demonstration of a DELETE call which traditionally deletes the resource. It is based on the same \"echo\" backend as in all other operations so nothing is actually deleted.",
"operationId": "remove-resource",
"summary": "Remove resource",
"responses": {
"200": {
"description": ""
}
}
},
"head": {
"description": "The HEAD operation returns only headers. In this demonstration a policy is used to set additional headers when the response is returned and to enable JSONP.",
"operationId": "retrieve-header-only",
"summary": "Retrieve header only",
"responses": {
"200": {
"description": ""
}
}
}
},
"/resource-cached": {
"get": {
"description": "A demonstration of a GET call with caching enabled on the same \"echo\" backend as above. Cache TTL is set to 1 hour. When you make the first request the headers you supplied will be cached. Subsequent calls will return the same headers as the first time even if you change them in your request.",
"operationId": "retrieve-resource-cached",
"summary": "Retrieve resource (cached)",
"parameters": [{
"name": "param1",
"in": "query",
"description": "A sample parameter that is required and has a default value of \"sample\".",
"required": true,
"type": "string",
"default": "sample",
"enum": ["sample"]
}, {
"name": "param2",
"in": "query",
"description": "Another sample parameter, set to not required.",
"type": "string"
}],
"responses": {
"200": {
"description": ""
}
}
}
}
},
"tags": []
}