grape-swagger-entity 0.3.3 → 0.3.4
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 +5 -5
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/lib/grape-swagger/entity/attribute_parser.rb +7 -0
- data/lib/grape-swagger/entity/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4a7174d692db16c799625455f1f2c7a076279068807227fd69653ffd4632fb5c
|
4
|
+
data.tar.gz: d3cd9eaf55b60ebc690f9cf91bbf031993defe105c2f7fc29931684fd7996ddf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed40d3f595f3a96bafbf8eedbd6fb111de55859e7f953ae9496f2455089a1ca2db8bbb78ba985f1dea55d99463c9684abacc0f608c6fca5996f04d3dd51154b2
|
7
|
+
data.tar.gz: a778ecfe799780a67942daca4476c7696f4bb3e3313334af1421e17f2272a575115903d5f84719c19f79905e5b40f5641a6cf22b8ce287c1b654a6b82ab31888
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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
@@ -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)
|
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.
|
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:
|
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
|
-
|
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
|