grape-swagger-entity 0.3.3 → 0.3.4

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
- SHA1:
3
- metadata.gz: 902654d02c87dd42858477d4696a7696593800b0
4
- data.tar.gz: 6c26a84436da085cc180e0cbd8fd4e3563d3874b
2
+ SHA256:
3
+ metadata.gz: 4a7174d692db16c799625455f1f2c7a076279068807227fd69653ffd4632fb5c
4
+ data.tar.gz: d3cd9eaf55b60ebc690f9cf91bbf031993defe105c2f7fc29931684fd7996ddf
5
5
  SHA512:
6
- metadata.gz: 5e2251aa39d752f7c791c4d7d933fc3844f1be16308ea083a16fc6d86c6dea5b161f3e806fc8a051ffbe31636ce6399d97a664b7175daee5f2b4fa4af09cc09c
7
- data.tar.gz: 36ff527340980f5368feb9ed2fb057236d316b4b4e3f3a4a90054ea046a596914c42165aa0388cae852205e12f3c7dc83a1276f8bebd0c7c08569a4569f3cdf8
6
+ metadata.gz: ed40d3f595f3a96bafbf8eedbd6fb111de55859e7f953ae9496f2455089a1ca2db8bbb78ba985f1dea55d99463c9684abacc0f608c6fca5996f04d3dd51154b2
7
+ data.tar.gz: a778ecfe799780a67942daca4476c7696f4bb3e3313334af1421e17f2272a575115903d5f84719c19f79905e5b40f5641a6cf22b8ce287c1b654a6b82ab31888
@@ -21,5 +21,5 @@ Metrics/MethodLength:
21
21
  Naming/FileName:
22
22
  Enabled: false
23
23
 
24
- Layout/IndentHash:
24
+ Layout/IndentFirstHashElement:
25
25
  EnforcedStyle: consistent
@@ -8,6 +8,12 @@
8
8
 
9
9
  * Your contribution here.
10
10
 
11
+ ### 0.3.4 (January 9, 2020)
12
+
13
+ #### Features
14
+
15
+ * [#40](https://github.com/ruby-grape/grape-swagger-entity/pull/40): Add support for minLength and maxLength - [@fotos](https://github.com/fotos).
16
+
11
17
  ### 0.3.3 (Fabruary 22, 2019)
12
18
 
13
19
  #### Features
data/Gemfile CHANGED
@@ -13,7 +13,7 @@ group :development, :test do
13
13
  gem 'rake'
14
14
  gem 'rdoc'
15
15
  gem 'rspec', '~> 3.0'
16
- gem 'rubocop', '~> 0.48'
16
+ gem 'rubocop', '~> 0.68.1'
17
17
  end
18
18
 
19
19
  gem 'grape-swagger', git: 'https://github.com/ruby-grape/grape-swagger.git'
@@ -36,6 +36,8 @@ module GrapeSwagger
36
36
  add_array_documentation(param, documentation)
37
37
  end
38
38
 
39
+ add_attribute_documentation(param, documentation)
40
+
39
41
  param
40
42
  end
41
43
  end
@@ -109,6 +111,11 @@ module GrapeSwagger
109
111
  attribute[:example] = example.is_a?(Proc) ? example.call : example
110
112
  end
111
113
 
114
+ def add_attribute_documentation(param, documentation)
115
+ param[:minLength] = documentation[:min_length] if documentation.key?(:min_length)
116
+ param[:maxLength] = documentation[:max_length] if documentation.key?(:max_length)
117
+ end
118
+
112
119
  def add_array_documentation(param, documentation)
113
120
  param[:minItems] = documentation[:min_items] if documentation.key?(:min_items)
114
121
  param[:maxItems] = documentation[:max_items] if documentation.key?(:max_items)
@@ -1,5 +1,5 @@
1
1
  module GrapeSwagger
2
2
  module Entity
3
- VERSION = '0.3.3'.freeze
3
+ VERSION = '0.3.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger-entity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Zaitsev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-22 00:00:00.000000000 Z
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape-entity
@@ -83,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  requirements: []
86
- rubyforge_project:
87
- rubygems_version: 2.5.2
86
+ rubygems_version: 3.0.1
88
87
  signing_key:
89
88
  specification_version: 4
90
89
  summary: Grape swagger adapter to support grape-entity object parsing