1
1
{
2
- "components" : {
3
- "schemas" : {
4
- "Todo" : {
5
- "description" : " This is some real Todo right here" ,
6
- "example" : {
7
- "created" : " 2015-12-31T00:00:00Z" ,
8
- "summary" : " get milk"
9
- },
10
- "properties" : {
11
- "created" : {
12
- "$ref" : " #/components/schemas/UTCTime"
13
- },
14
- "summary" : {
15
- "type" : " string"
16
- }
17
- },
18
- "required" : [
19
- " created" ,
20
- " summary"
21
- ],
22
- "type" : " object"
23
- },
24
- "TodoId" : {
25
- "maximum" : 9223372036854775807 ,
26
- "minimum" : -9223372036854775808 ,
27
- "type" : " integer"
28
- },
29
- "UTCTime" : {
30
- "example" : " 2016-07-22T00:00:00Z" ,
31
- "format" : " yyyy-mm-ddThh:MM:ssZ" ,
32
- "type" : " string"
33
- }
34
- }
35
- },
36
- "info" : {
37
- "description" : " This is an API that tests swagger integration" ,
38
- "license" : {
39
- "name" : " MIT" ,
40
- "url" : " http://mit.com"
41
- },
42
- "title" : " Todo API" ,
43
- "version" : " 1.0"
44
- },
45
- "openapi" : " 3.0.0" ,
46
- "paths" : {
47
- "/todo" : {
48
- "get" : {
49
- "responses" : {
50
- "200" : {
51
- "content" : {
52
- "application/json;charset=utf-8" : {
53
- "schema" : {
54
- "items" : {
55
- "$ref" : " #/components/schemas/Todo"
56
- },
57
- "type" : " array"
58
- }
59
- }
2
+ "components" : {
3
+ "schemas" : {
4
+ "Todo" : {
5
+ "description" : " This is some real Todo right here" ,
6
+ "example" : {
7
+ "created" : " 2015-12-31T00:00:00Z" ,
8
+ "summary" : " get milk"
9
+ },
10
+ "properties" : {
11
+ "created" : {
12
+ "$ref" : " #/components/schemas/UTCTime"
13
+ },
14
+ "summary" : {
15
+ "type" : " string"
16
+ }
17
+ },
18
+ "required" : [
19
+ " created" ,
20
+ " summary"
21
+ ],
22
+ "type" : " object"
60
23
},
61
- "description" : " "
62
- }
63
- }
64
- },
65
- "post" : {
66
- "requestBody" : {
67
- "content" : {
68
- "application/json;charset=utf-8" : {
69
- "schema" : {
70
- "$ref" : " #/components/schemas/Todo"
71
- }
72
- }
73
- }
74
- },
75
- "responses" : {
76
- "200" : {
77
- "content" : {
78
- "application/json;charset=utf-8" : {
79
- "schema" : {
80
- "$ref" : " #/components/schemas/TodoId"
81
- }
82
- }
24
+ "TodoId" : {
25
+ "maximum" : 9223372036854775807 ,
26
+ "minimum" : -9223372036854775808 ,
27
+ "type" : " integer"
83
28
},
84
- "description" : " "
85
- },
86
- "400" : {
87
- "description" : " Invalid `body`"
88
- }
89
- }
90
- }
91
- },
92
- "/todo/choices/{int}" : {
93
- "get" : {
94
- "parameters" : [
95
- {
96
- "in" : " path" ,
97
- "name" : " int" ,
98
- "required" : true ,
99
- "schema" : {
100
- "maximum" : 9223372036854775807 ,
101
- "minimum" : -9223372036854775808 ,
102
- "type" : " integer"
29
+ "UTCTime" : {
30
+ "example" : " 2016-07-22T00:00:00Z" ,
31
+ "format" : " yyyy-mm-ddThh:MM:ssZ" ,
32
+ "type" : " string"
103
33
}
104
- }
105
- ],
106
- "responses" : {
107
- "200" : {
108
- "content" : {
109
- "application/json" : {
110
- "schema" : {
111
- "type" : " boolean"
112
- }
113
- },
114
- "application/json;charset=utf-8" : {
115
- "schema" : {
116
- "type" : " boolean"
117
- }
118
- }
119
- },
120
- "description" : " Even number\n\n Odd number"
121
- },
122
- "400" : {
123
- "description" : " Negative"
124
- },
125
- "404" : {
126
- "description" : " `int` not found"
127
- }
128
34
}
129
- }
130
35
},
131
- "/todo/{id}" : {
132
- "get" : {
133
- "parameters" : [
134
- {
135
- "in" : " path" ,
136
- "name" : " id" ,
137
- "required" : true ,
138
- "schema" : {
139
- "maximum" : 9223372036854775807 ,
140
- "minimum" : -9223372036854775808 ,
141
- "type" : " integer"
142
- }
143
- }
144
- ],
145
- "responses" : {
146
- "200" : {
147
- "content" : {
148
- "application/json;charset=utf-8" : {
149
- "schema" : {
150
- "$ref" : " #/components/schemas/Todo"
36
+ "info" : {
37
+ "description" : " This is an API that tests swagger integration" ,
38
+ "license" : {
39
+ "name" : " MIT" ,
40
+ "url" : " http://mit.com"
41
+ },
42
+ "title" : " Todo API" ,
43
+ "version" : " 1.0"
44
+ },
45
+ "openapi" : " 3.0.0" ,
46
+ "paths" : {
47
+ "/todo" : {
48
+ "get" : {
49
+ "responses" : {
50
+ "200" : {
51
+ "content" : {
52
+ "application/json;charset=utf-8" : {
53
+ "schema" : {
54
+ "items" : {
55
+ "$ref" : " #/components/schemas/Todo"
56
+ },
57
+ "type" : " array"
58
+ }
59
+ }
60
+ },
61
+ "description" : " "
62
+ }
151
63
}
152
- }
153
64
},
154
- "description" : " "
155
- },
156
- "404" : {
157
- "description" : " `id` not found"
158
- }
159
- }
160
- },
161
- "put" : {
162
- "parameters" : [
163
- {
164
- "in" : " path" ,
165
- "name" : " id" ,
166
- "required" : true ,
167
- "schema" : {
168
- "maximum" : 9223372036854775807 ,
169
- "minimum" : -9223372036854775808 ,
170
- "type" : " integer"
65
+ "post" : {
66
+ "requestBody" : {
67
+ "content" : {
68
+ "application/json;charset=utf-8" : {
69
+ "schema" : {
70
+ "$ref" : " #/components/schemas/Todo"
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "responses" : {
76
+ "200" : {
77
+ "content" : {
78
+ "application/json;charset=utf-8" : {
79
+ "schema" : {
80
+ "$ref" : " #/components/schemas/TodoId"
81
+ }
82
+ }
83
+ },
84
+ "description" : " "
85
+ },
86
+ "400" : {
87
+ "description" : " Invalid `body`"
88
+ }
89
+ }
171
90
}
172
- }
173
- ],
174
- "requestBody" : {
175
- "content" : {
176
- "application/json;charset=utf-8" : {
177
- "schema" : {
178
- "$ref" : " #/components/schemas/Todo"
179
- }
91
+ },
92
+ "/todo/choices/{int}" : {
93
+ "get" : {
94
+ "parameters" : [
95
+ {
96
+ "in" : " path" ,
97
+ "name" : " int" ,
98
+ "required" : true ,
99
+ "schema" : {
100
+ "maximum" : 9223372036854775807 ,
101
+ "minimum" : -9223372036854775808 ,
102
+ "type" : " integer"
103
+ }
104
+ }
105
+ ],
106
+ "responses" : {
107
+ "200" : {
108
+ "content" : {
109
+ "application/json" : {
110
+ "schema" : {
111
+ "type" : " boolean"
112
+ }
113
+ },
114
+ "application/json;charset=utf-8" : {
115
+ "schema" : {
116
+ "type" : " boolean"
117
+ }
118
+ }
119
+ },
120
+ "description" : " Even number\n\n Odd number"
121
+ },
122
+ "400" : {
123
+ "description" : " Negative"
124
+ },
125
+ "404" : {
126
+ "description" : " `int` not found"
127
+ }
128
+ }
180
129
}
181
- }
182
130
},
183
- "responses" : {
184
- "200" : {
185
- "content" : {
186
- "application/json;charset=utf-8" : {
187
- "schema" : {
188
- "$ref" : " #/components/schemas/TodoId"
131
+ "/todo/{id}" : {
132
+ "get" : {
133
+ "parameters" : [
134
+ {
135
+ "in" : " path" ,
136
+ "name" : " id" ,
137
+ "required" : true ,
138
+ "schema" : {
139
+ "maximum" : 9223372036854775807 ,
140
+ "minimum" : -9223372036854775808 ,
141
+ "type" : " integer"
142
+ }
143
+ }
144
+ ],
145
+ "responses" : {
146
+ "200" : {
147
+ "content" : {
148
+ "application/json;charset=utf-8" : {
149
+ "schema" : {
150
+ "$ref" : " #/components/schemas/Todo"
151
+ }
152
+ }
153
+ },
154
+ "description" : " "
155
+ },
156
+ "404" : {
157
+ "description" : " `id` not found"
158
+ }
189
159
}
190
- }
191
160
},
192
- "description" : " "
193
- },
194
- "400" : {
195
- "description" : " Invalid `body`"
196
- },
197
- "404" : {
198
- "description" : " `id` not found"
199
- }
161
+ "put" : {
162
+ "parameters" : [
163
+ {
164
+ "in" : " path" ,
165
+ "name" : " id" ,
166
+ "required" : true ,
167
+ "schema" : {
168
+ "maximum" : 9223372036854775807 ,
169
+ "minimum" : -9223372036854775808 ,
170
+ "type" : " integer"
171
+ }
172
+ }
173
+ ],
174
+ "requestBody" : {
175
+ "content" : {
176
+ "application/json;charset=utf-8" : {
177
+ "schema" : {
178
+ "$ref" : " #/components/schemas/Todo"
179
+ }
180
+ }
181
+ }
182
+ },
183
+ "responses" : {
184
+ "200" : {
185
+ "content" : {
186
+ "application/json;charset=utf-8" : {
187
+ "schema" : {
188
+ "$ref" : " #/components/schemas/TodoId"
189
+ }
190
+ }
191
+ },
192
+ "description" : " "
193
+ },
194
+ "400" : {
195
+ "description" : " Invalid `body`"
196
+ },
197
+ "404" : {
198
+ "description" : " `id` not found"
199
+ }
200
+ }
201
+ }
200
202
}
201
- }
202
203
}
203
- }
204
- }
204
+ }
0 commit comments