grape-swagger-representable 0.2.0 → 0.2.1
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: f7843f1d937795abb96b6f88ffdf594f814679a1
|
4
|
+
data.tar.gz: bc4baf2779a918e43fbaf5bafc7da590d4731291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b5f4e1a40b85663454abf5bb246d7d8e5f89719264f87ddc8c63b6ef1bb8dce8433ed05f225eb640f7ec8291f851571496ba7d0ad7f44af026f8ca3056f4d51
|
7
|
+
data.tar.gz: 1ec6c429f2390e8d3f4028a38e064ffbac3190c31a8cb376b49d11e36817671baa93ea69212baa4fac44a6089afd1b94f8a06fe290fa5d732b646e837e2e6398
|
@@ -41,8 +41,11 @@ module GrapeSwagger
|
|
41
41
|
memo[:type] = data_type
|
42
42
|
end
|
43
43
|
|
44
|
+
default_value = documentation[:default] || property[:default] || nil
|
45
|
+
memo[:default] = default_value unless default_value.nil?
|
46
|
+
|
44
47
|
values = documentation[:values] || property[:values] || nil
|
45
|
-
memo[:enum] = values
|
48
|
+
memo[:enum] = values.is_a?(Proc) ? values.call : values if values
|
46
49
|
|
47
50
|
example = documentation[:example] || property[:example] || nil
|
48
51
|
memo[:example] = example.is_a?(Proc) ? example.call : example if example
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-swagger-representable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Zaitsev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape-swagger
|