grape-swagger 0.20.2 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -3
- data/.rubocop_todo.yml +43 -33
- data/.travis.yml +22 -13
- data/CHANGELOG.md +29 -53
- data/Gemfile +1 -1
- data/README.md +24 -24
- data/example/api/endpoints.rb +28 -29
- data/example/api/entities.rb +1 -1
- data/example/config.ru +5 -7
- data/grape-swagger.gemspec +1 -1
- data/lib/grape-swagger.rb +9 -6
- data/lib/grape-swagger/doc_methods.rb +1 -1
- data/lib/grape-swagger/doc_methods/extensions.rb +3 -3
- data/lib/grape-swagger/doc_methods/headers.rb +1 -1
- data/lib/grape-swagger/doc_methods/move_params.rb +25 -16
- data/lib/grape-swagger/doc_methods/operation_id.rb +2 -2
- data/lib/grape-swagger/doc_methods/parse_params.rb +12 -5
- data/lib/grape-swagger/doc_methods/path_string.rb +1 -1
- data/lib/grape-swagger/doc_methods/status_codes.rb +3 -1
- data/lib/grape-swagger/doc_methods/tag_name_description.rb +1 -1
- data/lib/grape-swagger/endpoint.rb +33 -46
- data/lib/grape-swagger/grape/route.rb +16 -0
- data/lib/grape-swagger/version.rb +1 -1
- data/spec/issues/403_versions_spec.rb +158 -0
- data/spec/lib/data_type_spec.rb +9 -10
- data/spec/lib/endpoint_spec.rb +1 -2
- data/spec/lib/extensions_spec.rb +44 -40
- data/spec/lib/move_params_spec.rb +113 -93
- data/spec/lib/operation_id_spec.rb +42 -12
- data/spec/lib/optional_object_spec.rb +3 -4
- data/spec/lib/path_string_spec.rb +2 -2
- data/spec/lib/produces_consumes_spec.rb +64 -53
- data/spec/markdown/redcarpet_adapter_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/api_swagger_v2_result.rb +122 -128
- data/spec/support/namespace_tags.rb +17 -19
- data/spec/support/the_api_entities.rb +1 -3
- data/spec/support/the_paths_definitions.rb +95 -85
- data/spec/swagger_v2/api_swagger_v2_definitions-models_spec.rb +1 -1
- data/spec/swagger_v2/api_swagger_v2_detail_spec.rb +19 -19
- data/spec/swagger_v2/api_swagger_v2_extensions_spec.rb +21 -21
- data/spec/swagger_v2/api_swagger_v2_format-content_type_spec.rb +34 -32
- data/spec/swagger_v2/api_swagger_v2_global_configuration_spec.rb +5 -7
- data/spec/swagger_v2/api_swagger_v2_headers_spec.rb +19 -18
- data/spec/swagger_v2/api_swagger_v2_hide_documentation_path_spec.rb +9 -10
- data/spec/swagger_v2/api_swagger_v2_mounted_spec.rb +21 -24
- data/spec/swagger_v2/api_swagger_v2_param_type_body_nested_spec.rb +90 -92
- data/spec/swagger_v2/api_swagger_v2_param_type_body_spec.rb +54 -54
- data/spec/swagger_v2/api_swagger_v2_param_type_spec.rb +65 -57
- data/spec/swagger_v2/api_swagger_v2_request_params_fix_spec.rb +17 -14
- data/spec/swagger_v2/api_swagger_v2_response_spec.rb +79 -123
- data/spec/swagger_v2/api_swagger_v2_spec.rb +33 -34
- data/spec/swagger_v2/api_swagger_v2_type-format_spec.rb +32 -36
- data/spec/swagger_v2/boolean_params_spec.rb +1 -1
- data/spec/swagger_v2/default_api_spec.rb +26 -29
- data/spec/swagger_v2/description_not_initialized.rb +3 -3
- data/spec/swagger_v2/float_api_spec.rb +1 -1
- data/spec/swagger_v2/form_params_spec.rb +4 -4
- data/spec/swagger_v2/hide_api_spec.rb +48 -51
- data/spec/swagger_v2/host.rb +1 -1
- data/spec/swagger_v2/mounted_target_class_spec.rb +31 -33
- data/spec/swagger_v2/namespace_tags_prefix_spec.rb +23 -21
- data/spec/swagger_v2/namespace_tags_spec.rb +23 -20
- data/spec/swagger_v2/param_type_spec.rb +5 -6
- data/spec/swagger_v2/param_values_spec.rb +31 -37
- data/spec/swagger_v2/params_array_spec.rb +17 -15
- data/spec/swagger_v2/params_hash_spec.rb +17 -15
- data/spec/swagger_v2/params_nested_spec.rb +12 -10
- data/spec/swagger_v2/reference_entity.rb +9 -9
- data/spec/swagger_v2/response_model_spec.rb +58 -62
- data/spec/swagger_v2/simple_mounted_api_spec.rb +179 -147
- metadata +5 -10
- data/spec/params_entity_spec.rb +0 -49
@@ -10,46 +10,54 @@ describe 'a simple mounted api' do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
desc 'This gets something.',
|
13
|
-
|
13
|
+
notes: '_test_'
|
14
14
|
|
15
15
|
get '/simple' do
|
16
16
|
{ bla: 'something' }
|
17
17
|
end
|
18
18
|
|
19
19
|
desc 'This gets something for URL using - separator.',
|
20
|
-
|
20
|
+
notes: '_test_'
|
21
21
|
|
22
22
|
get '/simple-test' do
|
23
23
|
{ bla: 'something' }
|
24
24
|
end
|
25
25
|
|
26
|
+
head '/simple-head-test' do
|
27
|
+
status 200
|
28
|
+
end
|
29
|
+
|
30
|
+
options '/simple-options-test' do
|
31
|
+
status 200
|
32
|
+
end
|
33
|
+
|
26
34
|
desc 'this gets something else',
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
+
headers: {
|
36
|
+
'XAuthToken' => { description: 'A required header.', required: true },
|
37
|
+
'XOtherHeader' => { description: 'An optional header.', required: false }
|
38
|
+
},
|
39
|
+
http_codes: [
|
40
|
+
{ code: 403, message: 'invalid pony' },
|
41
|
+
{ code: 405, message: 'no ponies left!' }
|
42
|
+
]
|
35
43
|
|
36
44
|
get '/simple_with_headers' do
|
37
45
|
{ bla: 'something_else' }
|
38
46
|
end
|
39
47
|
|
40
48
|
desc 'this takes an array of parameters',
|
41
|
-
|
42
|
-
|
43
|
-
|
49
|
+
params: {
|
50
|
+
'items[]' => { description: 'array of items', is_array: true }
|
51
|
+
}
|
44
52
|
|
45
53
|
post '/items' do
|
46
54
|
{}
|
47
55
|
end
|
48
56
|
|
49
57
|
desc 'this uses a custom parameter',
|
50
|
-
|
51
|
-
|
52
|
-
|
58
|
+
params: {
|
59
|
+
'custom' => { type: CustomType, description: 'array of items', is_array: true }
|
60
|
+
}
|
53
61
|
|
54
62
|
get '/custom' do
|
55
63
|
{}
|
@@ -66,78 +74,88 @@ describe 'a simple mounted api' do
|
|
66
74
|
SimpleApi
|
67
75
|
end
|
68
76
|
|
69
|
-
describe
|
77
|
+
describe 'retrieves swagger-documentation on /swagger_doc' do
|
70
78
|
subject do
|
71
79
|
get '/swagger_doc.json'
|
72
80
|
JSON.parse(last_response.body)
|
73
81
|
end
|
74
82
|
|
75
83
|
specify do
|
76
|
-
expect(subject).to eq(
|
77
|
-
|
78
|
-
|
79
|
-
"produces"=>["application/xml", "application/json", "application/octet-stream", "text/plain"],
|
80
|
-
"host"=>"example.org",
|
81
|
-
"tags" => [{"name"=>"simple", "description"=>"Operations about simples"}, {"name"=>"simple-test", "description"=>"Operations about simple-tests"}, {"name"=>"simple_with_headers", "description"=>"Operations about simple_with_headers"}, {"name"=>"items", "description"=>"Operations about items"}, {"name"=>"custom", "description"=>"Operations about customs"}],
|
82
|
-
"paths"=>{
|
83
|
-
"/simple"=>{
|
84
|
-
"get"=>{
|
85
|
-
"description"=>"This gets something.",
|
86
|
-
"produces"=>["application/json"],
|
87
|
-
"tags"=>["simple"],
|
88
|
-
"operationId"=>"getSimple",
|
89
|
-
"responses"=>{"200"=>{"description"=>"This gets something."}}}},
|
90
|
-
"/simple-test"=>{
|
91
|
-
"get"=>{
|
92
|
-
"description"=>"This gets something for URL using - separator.",
|
93
|
-
"produces"=>["application/json"],
|
94
|
-
"tags"=>["simple-test"],
|
95
|
-
"operationId"=>"getSimpleTest",
|
96
|
-
"responses"=>{"200"=>{"description"=>"This gets something for URL using - separator."}}}},
|
97
|
-
"/simple_with_headers"=>{
|
98
|
-
"get"=>{
|
99
|
-
"description"=>"this gets something else",
|
100
|
-
"produces"=>["application/json"],
|
101
|
-
"parameters"=>[
|
102
|
-
{"in"=>"header", "name"=>"XAuthToken", "description"=>"A required header.", "type"=>"string", "required"=>true},
|
103
|
-
{"in"=>"header", "name"=>"XOtherHeader", "description"=>"An optional header.", "type"=>"string", "required"=>false}],
|
104
|
-
"tags"=>["simple_with_headers"],
|
105
|
-
"operationId"=>"getSimpleWithHeaders",
|
106
|
-
"responses"=>{
|
107
|
-
"200"=>{"description"=>"this gets something else"},
|
108
|
-
"403"=>{"description"=>"invalid pony"},
|
109
|
-
"405"=>{"description"=>"no ponies left!"}}
|
110
|
-
}},
|
111
|
-
"/items"=>{
|
112
|
-
"post"=>{
|
113
|
-
"description"=>"this takes an array of parameters",
|
114
|
-
"produces"=>["application/json"],
|
115
|
-
"consumes"=>["application/json"],
|
116
|
-
"parameters"=>[{"in"=>"formData", "name"=>"items[]", "description"=>"array of items", "required"=>false, "type"=>"array", "items"=>{"type"=>"string"}}],
|
117
|
-
"tags"=>["items"],
|
118
|
-
"operationId"=>"postItems",
|
119
|
-
"responses"=>{"201"=>{"description"=>"this takes an array of parameters", "schema"=>{"$ref"=>"#/definitions/Item"}}}
|
120
|
-
}},
|
121
|
-
"/custom"=>{
|
122
|
-
"get"=>{
|
123
|
-
"description"=>"this uses a custom parameter",
|
124
|
-
"produces"=>["application/json"],
|
125
|
-
"parameters"=>[{"in"=>"formData", "name"=>"custom", "description"=>"array of items", "required"=>false, "type"=>"array", "items"=>{"type"=>"CustomType"}}],
|
126
|
-
"tags"=>["custom"],
|
127
|
-
"operationId"=>"getCustom",
|
128
|
-
"responses"=>{"200"=>{"description"=>"this uses a custom parameter", "schema"=>{"$ref"=>"#/definitions/Custom"}}}}
|
129
|
-
}},
|
130
|
-
"definitions"=>{
|
131
|
-
"Item"=>{
|
132
|
-
"type"=>"object",
|
133
|
-
"properties"=>{"items[]"=>{"type"=>"string"}},
|
134
|
-
"description"=>"this takes an array of parameters"
|
84
|
+
expect(subject).to eq(
|
85
|
+
'info' => {
|
86
|
+
'title' => 'API title', 'version' => '0.0.1'
|
135
87
|
},
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
88
|
+
'swagger' => '2.0',
|
89
|
+
'produces' => ['application/xml', 'application/json', 'application/octet-stream', 'text/plain'],
|
90
|
+
'host' => 'example.org',
|
91
|
+
'tags' => [
|
92
|
+
{ 'name' => 'simple', 'description' => 'Operations about simples' },
|
93
|
+
{ 'name' => 'simple-test', 'description' => 'Operations about simple-tests' },
|
94
|
+
{ 'name' => 'simple-head-test', 'description' => 'Operations about simple-head-tests' },
|
95
|
+
{ 'name' => 'simple-options-test', 'description' => 'Operations about simple-options-tests' },
|
96
|
+
{ 'name' => 'simple_with_headers', 'description' => 'Operations about simple_with_headers' },
|
97
|
+
{ 'name' => 'items', 'description' => 'Operations about items' },
|
98
|
+
{ 'name' => 'custom', 'description' => 'Operations about customs' }],
|
99
|
+
'paths' => {
|
100
|
+
'/simple' => {
|
101
|
+
'get' => {
|
102
|
+
'description' => 'This gets something.',
|
103
|
+
'produces' => ['application/json'],
|
104
|
+
'tags' => ['simple'],
|
105
|
+
'operationId' => 'getSimple',
|
106
|
+
'responses' => { '200' => { 'description' => 'This gets something.' } } } },
|
107
|
+
'/simple-test' => {
|
108
|
+
'get' => {
|
109
|
+
'description' => 'This gets something for URL using - separator.',
|
110
|
+
'produces' => ['application/json'],
|
111
|
+
'tags' => ['simple-test'],
|
112
|
+
'operationId' => 'getSimpleTest',
|
113
|
+
'responses' => { '200' => { 'description' => 'This gets something for URL using - separator.' } } } },
|
114
|
+
'/simple-head-test' => {
|
115
|
+
'head' => {
|
116
|
+
'produces' => ['application/json'],
|
117
|
+
'responses' => { '200' => { 'description' => 'head SimpleHeadTest' } },
|
118
|
+
'tags' => ['simple-head-test'],
|
119
|
+
'operationId' => 'headSimpleHeadTest' } },
|
120
|
+
'/simple-options-test' => {
|
121
|
+
'options' => {
|
122
|
+
'produces' => ['application/json'],
|
123
|
+
'responses' => { '200' => { 'description' => 'option SimpleOptionsTest' } },
|
124
|
+
'tags' => ['simple-options-test'],
|
125
|
+
'operationId' => 'optionsSimpleOptionsTest' } },
|
126
|
+
'/simple_with_headers' => {
|
127
|
+
'get' => {
|
128
|
+
'description' => 'this gets something else',
|
129
|
+
'produces' => ['application/json'],
|
130
|
+
'parameters' => [
|
131
|
+
{ 'in' => 'header', 'name' => 'XAuthToken', 'description' => 'A required header.', 'type' => 'string', 'required' => true },
|
132
|
+
{ 'in' => 'header', 'name' => 'XOtherHeader', 'description' => 'An optional header.', 'type' => 'string', 'required' => false }],
|
133
|
+
'tags' => ['simple_with_headers'],
|
134
|
+
'operationId' => 'getSimpleWithHeaders',
|
135
|
+
'responses' => {
|
136
|
+
'200' => { 'description' => 'this gets something else' },
|
137
|
+
'403' => { 'description' => 'invalid pony' },
|
138
|
+
'405' => { 'description' => 'no ponies left!' } }
|
139
|
+
} },
|
140
|
+
'/items' => {
|
141
|
+
'post' => {
|
142
|
+
'description' => 'this takes an array of parameters',
|
143
|
+
'produces' => ['application/json'],
|
144
|
+
'consumes' => ['application/json'],
|
145
|
+
'parameters' => [{ 'in' => 'formData', 'name' => 'items[]', 'description' => 'array of items', 'required' => false, 'type' => 'array', 'items' => { 'type' => 'string' } }],
|
146
|
+
'tags' => ['items'],
|
147
|
+
'operationId' => 'postItems',
|
148
|
+
'responses' => { '201' => { 'description' => 'this takes an array of parameters' } }
|
149
|
+
} },
|
150
|
+
'/custom' => {
|
151
|
+
'get' => {
|
152
|
+
'description' => 'this uses a custom parameter',
|
153
|
+
'produces' => ['application/json'],
|
154
|
+
'parameters' => [{ 'in' => 'formData', 'name' => 'custom', 'description' => 'array of items', 'required' => false, 'type' => 'array', 'items' => { 'type' => 'CustomType' } }],
|
155
|
+
'tags' => ['custom'],
|
156
|
+
'operationId' => 'getCustom',
|
157
|
+
'responses' => { '200' => { 'description' => 'this uses a custom parameter' } } }
|
158
|
+
} })
|
141
159
|
end
|
142
160
|
end
|
143
161
|
|
@@ -148,21 +166,28 @@ describe 'a simple mounted api' do
|
|
148
166
|
end
|
149
167
|
|
150
168
|
specify do
|
151
|
-
expect(subject).to eq(
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
169
|
+
expect(subject).to eq(
|
170
|
+
'info' => { 'title' => 'API title', 'version' => '0.0.1' },
|
171
|
+
'swagger' => '2.0',
|
172
|
+
'produces' => ['application/xml', 'application/json', 'application/octet-stream', 'text/plain'],
|
173
|
+
'host' => 'example.org',
|
174
|
+
'tags' => [
|
175
|
+
{ 'name' => 'simple', 'description' => 'Operations about simples' },
|
176
|
+
{ 'name' => 'simple-test', 'description' => 'Operations about simple-tests' },
|
177
|
+
{ 'name' => 'simple-head-test', 'description' => 'Operations about simple-head-tests' },
|
178
|
+
{ 'name' => 'simple-options-test', 'description' => 'Operations about simple-options-tests' },
|
179
|
+
{ 'name' => 'simple_with_headers', 'description' => 'Operations about simple_with_headers' },
|
180
|
+
{ 'name' => 'items', 'description' => 'Operations about items' },
|
181
|
+
{ 'name' => 'custom', 'description' => 'Operations about customs' }],
|
182
|
+
'paths' => {
|
183
|
+
'/simple' => {
|
184
|
+
'get' => {
|
185
|
+
'description' => 'This gets something.',
|
186
|
+
'produces' => ['application/json'],
|
187
|
+
'tags' => ['simple'],
|
188
|
+
'operationId' => 'getSimple',
|
189
|
+
'responses' => { '200' => { 'description' => 'This gets something.' } } } }
|
190
|
+
})
|
166
191
|
end
|
167
192
|
end
|
168
193
|
|
@@ -174,21 +199,28 @@ describe 'a simple mounted api' do
|
|
174
199
|
end
|
175
200
|
|
176
201
|
specify do
|
177
|
-
expect(subject).to eq(
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
202
|
+
expect(subject).to eq(
|
203
|
+
'info' => { 'title' => 'API title', 'version' => '0.0.1' },
|
204
|
+
'swagger' => '2.0',
|
205
|
+
'produces' => ['application/xml', 'application/json', 'application/octet-stream', 'text/plain'],
|
206
|
+
'host' => 'example.org',
|
207
|
+
'tags' => [
|
208
|
+
{ 'name' => 'simple', 'description' => 'Operations about simples' },
|
209
|
+
{ 'name' => 'simple-test', 'description' => 'Operations about simple-tests' },
|
210
|
+
{ 'name' => 'simple-head-test', 'description' => 'Operations about simple-head-tests' },
|
211
|
+
{ 'name' => 'simple-options-test', 'description' => 'Operations about simple-options-tests' },
|
212
|
+
{ 'name' => 'simple_with_headers', 'description' => 'Operations about simple_with_headers' },
|
213
|
+
{ 'name' => 'items', 'description' => 'Operations about items' },
|
214
|
+
{ 'name' => 'custom', 'description' => 'Operations about customs' }],
|
215
|
+
'paths' => {
|
216
|
+
'/simple-test' => {
|
217
|
+
'get' => {
|
218
|
+
'description' => 'This gets something for URL using - separator.',
|
219
|
+
'produces' => ['application/json'],
|
220
|
+
'tags' => ['simple-test'],
|
221
|
+
'operationId' => 'getSimpleTest',
|
222
|
+
'responses' => { '200' => { 'description' => 'This gets something for URL using - separator.' } } } }
|
223
|
+
})
|
192
224
|
end
|
193
225
|
end
|
194
226
|
|
@@ -199,21 +231,21 @@ describe 'a simple mounted api' do
|
|
199
231
|
end
|
200
232
|
|
201
233
|
specify do
|
202
|
-
expect(subject['paths']).to eq(
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
{
|
209
|
-
{
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
}
|
234
|
+
expect(subject['paths']).to eq(
|
235
|
+
'/simple_with_headers' => {
|
236
|
+
'get' => {
|
237
|
+
'description' => 'this gets something else',
|
238
|
+
'produces' => ['application/json'],
|
239
|
+
'parameters' => [
|
240
|
+
{ 'in' => 'header', 'name' => 'XAuthToken', 'description' => 'A required header.', 'type' => 'string', 'required' => true },
|
241
|
+
{ 'in' => 'header', 'name' => 'XOtherHeader', 'description' => 'An optional header.', 'type' => 'string', 'required' => false }],
|
242
|
+
'tags' => ['simple_with_headers'],
|
243
|
+
'operationId' => 'getSimpleWithHeaders',
|
244
|
+
'responses' => {
|
245
|
+
'200' => { 'description' => 'this gets something else' },
|
246
|
+
'403' => { 'description' => 'invalid pony' },
|
247
|
+
'405' => { 'description' => 'no ponies left!' } } }
|
248
|
+
})
|
217
249
|
end
|
218
250
|
end
|
219
251
|
|
@@ -224,17 +256,17 @@ describe 'a simple mounted api' do
|
|
224
256
|
end
|
225
257
|
|
226
258
|
specify do
|
227
|
-
expect(subject['paths']).to eq(
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
}
|
259
|
+
expect(subject['paths']).to eq(
|
260
|
+
'/items' => {
|
261
|
+
'post' => {
|
262
|
+
'description' => 'this takes an array of parameters',
|
263
|
+
'produces' => ['application/json'],
|
264
|
+
'consumes' => ['application/json'],
|
265
|
+
'parameters' => [{ 'in' => 'formData', 'name' => 'items[]', 'description' => 'array of items', 'required' => false, 'type' => 'array', 'items' => { 'type' => 'string' } }],
|
266
|
+
'tags' => ['items'],
|
267
|
+
'operationId' => 'postItems',
|
268
|
+
'responses' => { '201' => { 'description' => 'this takes an array of parameters' } } }
|
269
|
+
})
|
238
270
|
end
|
239
271
|
end
|
240
272
|
|
@@ -245,16 +277,16 @@ describe 'a simple mounted api' do
|
|
245
277
|
end
|
246
278
|
|
247
279
|
specify do
|
248
|
-
expect(subject['paths']).to eq(
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
}
|
280
|
+
expect(subject['paths']).to eq(
|
281
|
+
'/custom' => {
|
282
|
+
'get' => {
|
283
|
+
'description' => 'this uses a custom parameter',
|
284
|
+
'produces' => ['application/json'],
|
285
|
+
'parameters' => [{ 'in' => 'formData', 'name' => 'custom', 'description' => 'array of items', 'required' => false, 'type' => 'array', 'items' => { 'type' => 'CustomType' } }],
|
286
|
+
'tags' => ['custom'],
|
287
|
+
'operationId' => 'getCustom',
|
288
|
+
'responses' => { '200' => { 'description' => 'this uses a custom parameter' } } }
|
289
|
+
})
|
258
290
|
end
|
259
291
|
end
|
260
292
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-swagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Vandecasteele
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.12.0
|
20
|
-
- - "<="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.14.0
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.12.0
|
30
|
-
- - "<="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.14.0
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: grape-entity
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -284,9 +278,11 @@ files:
|
|
284
278
|
- lib/grape-swagger/doc_methods/tag_name_description.rb
|
285
279
|
- lib/grape-swagger/endpoint.rb
|
286
280
|
- lib/grape-swagger/errors.rb
|
281
|
+
- lib/grape-swagger/grape/route.rb
|
287
282
|
- lib/grape-swagger/markdown/kramdown_adapter.rb
|
288
283
|
- lib/grape-swagger/markdown/redcarpet_adapter.rb
|
289
284
|
- lib/grape-swagger/version.rb
|
285
|
+
- spec/issues/403_versions_spec.rb
|
290
286
|
- spec/lib/data_type_spec.rb
|
291
287
|
- spec/lib/endpoint_spec.rb
|
292
288
|
- spec/lib/extensions_spec.rb
|
@@ -297,7 +293,6 @@ files:
|
|
297
293
|
- spec/lib/produces_consumes_spec.rb
|
298
294
|
- spec/markdown/kramdown_adapter_spec.rb
|
299
295
|
- spec/markdown/redcarpet_adapter_spec.rb
|
300
|
-
- spec/params_entity_spec.rb
|
301
296
|
- spec/spec_helper.rb
|
302
297
|
- spec/support/api_swagger_v2_result.rb
|
303
298
|
- spec/support/grape_version.rb
|
@@ -366,6 +361,7 @@ specification_version: 4
|
|
366
361
|
summary: A simple way to add auto generated documentation to your Grape API that can
|
367
362
|
be displayed with Swagger.
|
368
363
|
test_files:
|
364
|
+
- spec/issues/403_versions_spec.rb
|
369
365
|
- spec/lib/data_type_spec.rb
|
370
366
|
- spec/lib/endpoint_spec.rb
|
371
367
|
- spec/lib/extensions_spec.rb
|
@@ -376,7 +372,6 @@ test_files:
|
|
376
372
|
- spec/lib/produces_consumes_spec.rb
|
377
373
|
- spec/markdown/kramdown_adapter_spec.rb
|
378
374
|
- spec/markdown/redcarpet_adapter_spec.rb
|
379
|
-
- spec/params_entity_spec.rb
|
380
375
|
- spec/spec_helper.rb
|
381
376
|
- spec/support/api_swagger_v2_result.rb
|
382
377
|
- spec/support/grape_version.rb
|