grape-swagger 0.25.1 → 0.25.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 152d9012cfd228b57f5bd894703832545865d0b7
|
4
|
+
data.tar.gz: d2fb99d11bb2c0329df1310fff779277c0b9c950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bfede986d83fcd0bcbf29533872902269700906b81e35235efdf26f260fff8d79316192c579ca2248602bcc8abfef557a6df353d53fba03379616242b1f88ba
|
7
|
+
data.tar.gz: ae63ced69632be01f0f22944e0b261811bb14ea8c023ce7bed1556041d6bc1624d045d2beb1f3a73b347f2c019beb83b6f0cf316c446f2ef7a47f4ba98bf7552
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,12 @@
|
|
9
9
|
* Your contribution here.
|
10
10
|
|
11
11
|
|
12
|
+
### 0.25.2 (November 30, 2016)
|
13
|
+
|
14
|
+
#### Fixes
|
15
|
+
|
16
|
+
* [#544](https://github.com/ruby-grape/grape-swagger/pull/544): Fixes #539 and #542; not all of 530 was commited - [@LeFnord](https://github.com/LeFnord).
|
17
|
+
|
12
18
|
### 0.25.1 (November 29, 2016)
|
13
19
|
|
14
20
|
#### Features
|
@@ -2,10 +2,10 @@ require 'spec_helper'
|
|
2
2
|
require 'grape-entity'
|
3
3
|
require 'grape-swagger-entity'
|
4
4
|
|
5
|
-
describe '#
|
5
|
+
describe '#539 post params given as array' do
|
6
6
|
let(:app) do
|
7
7
|
Class.new(Grape::API) do
|
8
|
-
namespace :
|
8
|
+
namespace :issue_539 do
|
9
9
|
class Element < Grape::Entity
|
10
10
|
expose :id
|
11
11
|
expose :description
|
@@ -35,7 +35,7 @@ describe '#427 nested entity given as string' do
|
|
35
35
|
JSON.parse(last_response.body)
|
36
36
|
end
|
37
37
|
|
38
|
-
let(:parameters) { subject['paths']['/
|
38
|
+
let(:parameters) { subject['paths']['/issue_539']['post']['parameters'] }
|
39
39
|
let(:definitions) { subject['definitions'] }
|
40
40
|
|
41
41
|
specify do
|
@@ -48,7 +48,9 @@ describe '#427 nested entity given as string' do
|
|
48
48
|
}
|
49
49
|
]
|
50
50
|
)
|
51
|
+
end
|
51
52
|
|
53
|
+
specify do
|
52
54
|
expect(definitions).to eql(
|
53
55
|
'Element' => {
|
54
56
|
'type' => 'object',
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'grape-entity'
|
3
|
+
require 'grape-swagger-entity'
|
4
|
+
|
5
|
+
describe '#542 array of type in post params' do
|
6
|
+
let(:app) do
|
7
|
+
Class.new(Grape::API) do
|
8
|
+
namespace :issue_542 do
|
9
|
+
params do
|
10
|
+
requires :logs, type: Array[String], documentation: { param_type: 'body' }
|
11
|
+
end
|
12
|
+
|
13
|
+
post do
|
14
|
+
present params
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
add_swagger_documentation format: :json
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
subject do
|
23
|
+
get '/swagger_doc'
|
24
|
+
JSON.parse(last_response.body)
|
25
|
+
end
|
26
|
+
|
27
|
+
let(:parameters) { subject['paths']['/issue_542']['post']['parameters'] }
|
28
|
+
|
29
|
+
specify do
|
30
|
+
expect(parameters).to eql(
|
31
|
+
[
|
32
|
+
{
|
33
|
+
'in' => 'body',
|
34
|
+
'name' => 'logs',
|
35
|
+
'required' => true,
|
36
|
+
'schema' => {
|
37
|
+
'type' => 'array',
|
38
|
+
'items' => {
|
39
|
+
'type' => 'string'
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
]
|
44
|
+
)
|
45
|
+
end
|
46
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-swagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Vandecasteele
|
@@ -262,7 +262,8 @@ files:
|
|
262
262
|
- spec/issues/427_entity_as_string_spec.rb
|
263
263
|
- spec/issues/430_entity_definitions_spec.rb
|
264
264
|
- spec/issues/533_specify_status_code_spec.rb
|
265
|
-
- spec/issues/
|
265
|
+
- spec/issues/539_array_post_body_spec.rb
|
266
|
+
- spec/issues/542_array_of_type_in_post_body_spec.rb
|
266
267
|
- spec/lib/data_type_spec.rb
|
267
268
|
- spec/lib/endpoint_spec.rb
|
268
269
|
- spec/lib/extensions_spec.rb
|
@@ -361,7 +362,8 @@ test_files:
|
|
361
362
|
- spec/issues/427_entity_as_string_spec.rb
|
362
363
|
- spec/issues/430_entity_definitions_spec.rb
|
363
364
|
- spec/issues/533_specify_status_code_spec.rb
|
364
|
-
- spec/issues/
|
365
|
+
- spec/issues/539_array_post_body_spec.rb
|
366
|
+
- spec/issues/542_array_of_type_in_post_body_spec.rb
|
365
367
|
- spec/lib/data_type_spec.rb
|
366
368
|
- spec/lib/endpoint_spec.rb
|
367
369
|
- spec/lib/extensions_spec.rb
|