Skip to content

Commit 64fd942

Browse files
committed
add globalConsumesAndProduces.json
1 parent 5144c54 commit 64fd942

File tree

1 file changed

+149
-0
lines changed

1 file changed

+149
-0
lines changed
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"description": "Spec for testing global consumes and produces",
5+
"version": "1.0.0",
6+
"title": "Swagger Petstore",
7+
"termsOfService": "http://swagger.io/terms/",
8+
"contact": {
9+
"email": "[email protected]"
10+
},
11+
"license": {
12+
"name": "Apache 2.0",
13+
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
14+
}
15+
},
16+
"host": "petstore.swagger.io",
17+
"basePath": "/v2",
18+
"consumes": ["application/global_consumes"],
19+
"produces": ["application/global_produces"],
20+
"schemes": [
21+
"http"
22+
],
23+
"paths": {
24+
"/tests/localConsumesAndProduces": {
25+
"get": {
26+
"tags": [
27+
"tests"
28+
],
29+
"summary": "Operation with local consumes and produces",
30+
"description": "",
31+
"operationId": "localConsumesAndProduces",
32+
"produces": [
33+
"application/json"
34+
],
35+
"consumes": [
36+
"application/json"
37+
],
38+
"parameters": [
39+
],
40+
"responses": {
41+
"200": {
42+
"description": "successful operation. Returning a simple int.",
43+
"schema": {
44+
"type": "integer",
45+
"format": "int64"
46+
}
47+
}
48+
}
49+
},
50+
"post": {
51+
"tags": [
52+
"tests"
53+
],
54+
"summary": "Operation with global consumes and produces",
55+
"description": "",
56+
"operationId": "globalConsumesAndProduces",
57+
"parameters": [
58+
],
59+
"responses": {
60+
"200": {
61+
"description": "successful operation. Returning a simple int.",
62+
"schema": {
63+
"type": "integer",
64+
"format": "int64"
65+
}
66+
}
67+
}
68+
}
69+
},
70+
"/tests/globalConsumesAndProduces": {
71+
"get": {
72+
"tags": [
73+
"tests"
74+
],
75+
"summary": "Operation with global consumes and produces",
76+
"description": "",
77+
"operationId": "globalConsumesAndProduces",
78+
"parameters": [
79+
],
80+
"responses": {
81+
"200": {
82+
"description": "successful operation. Returning a simple int.",
83+
"schema": {
84+
"type": "integer",
85+
"format": "int64"
86+
}
87+
}
88+
}
89+
}
90+
},
91+
"/tests/localResetConsumesAndProduces": {
92+
"get": {
93+
"tags": [
94+
"tests"
95+
],
96+
"summary": "Operation with local consumes and produces set to empty (reset)",
97+
"description": "",
98+
"operationId": "localResetConsumesAndProduces",
99+
"parameters": [
100+
],
101+
"consumes": [],
102+
"produces": [],
103+
"responses": {
104+
"200": {
105+
"description": "successful operation. Returning a simple int.",
106+
"schema": {
107+
"type": "integer",
108+
"format": "int64"
109+
}
110+
}
111+
}
112+
}
113+
}
114+
115+
},
116+
"securityDefinitions": {
117+
"api_key": {
118+
"type": "apiKey",
119+
"name": "api_key",
120+
"in": "header"
121+
},
122+
"petstore_auth": {
123+
"type": "oauth2",
124+
"authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog",
125+
"flow": "implicit",
126+
"scopes": {
127+
"write:pets": "modify pets in your account",
128+
"read:pets": "read your pets"
129+
}
130+
}
131+
},
132+
"definitions": {
133+
"CustomModel": {
134+
"required": [
135+
"id"
136+
],
137+
"properties": {
138+
"id": {
139+
"type": "integer",
140+
"format": "int64"
141+
},
142+
"name": {
143+
"type": "string",
144+
"example": "doggie"
145+
}
146+
}
147+
}
148+
}
149+
}

0 commit comments

Comments
 (0)