typed-parameter 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -1
- data/lib/typed_parameter/version.rb +1 -1
- data/typed_parameter.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8deba22f3280f1a4c5f01b83121402cd83822afb8602504a319faeb20ec10d8d
|
4
|
+
data.tar.gz: 9723defcab7d274fd354d00d8d60f0a1c04bd4e3de0750ee932fe4b6237c7456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8fbe3cfcdfcd1b3c5b30ee074cd958a9a38c3c2fb0b94545e9badd7f1757e7fce0378d6adec90058a70257b218f3b9c3ebc4bcd873900a18e7012837cafbb2c
|
7
|
+
data.tar.gz: 0acdee06d0c4458b0f229b8898a72d9ae624328954715de6a2702d281b425f9be88a0d129a7b5616a963e71d7214d5a6a34c241aba9e3d0244e841eda50e9355
|
data/README.md
CHANGED
@@ -201,7 +201,25 @@ TypedParameter::Constants.register :Email, EmailConstrant
|
|
201
201
|
TypedParameter::Swagger::Types.register :Email, EmailSwaggerType
|
202
202
|
~~~
|
203
203
|
|
204
|
-
Example 5.
|
204
|
+
Example 5. Use Inline Block
|
205
|
+
------
|
206
|
+
You can use parameter class by block
|
207
|
+
|
208
|
+
~~~ruby
|
209
|
+
class BlockParameter < TypedParameter::Base
|
210
|
+
field :some_object, Object do |i|
|
211
|
+
i.field :name, String
|
212
|
+
i.field :type, String
|
213
|
+
end
|
214
|
+
|
215
|
+
field :other_hash_list, [Hash] do |i|
|
216
|
+
i.field :index, Integer
|
217
|
+
i.field :value, Float
|
218
|
+
end
|
219
|
+
end
|
220
|
+
~~~
|
221
|
+
|
222
|
+
Example 6. Swaggerize
|
205
223
|
------
|
206
224
|
With Rswag(https://github.com/rswag/rswag), you can swaggerize your parameter types.
|
207
225
|
|
data/typed_parameter.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.homepage = 'https://github.com/tranquilthink/typed-parameter'
|
11
11
|
spec.license = 'MIT'
|
12
12
|
spec.platform = Gem::Platform::RUBY
|
13
|
-
spec.required_ruby_version = '>=
|
13
|
+
spec.required_ruby_version = '>= 2.7.0'
|
14
14
|
|
15
15
|
# spec.metadata['allowed_push_host'] = "https://github.com/tranquilthink/typed-parameter"
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typed-parameter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minwoo Jo
|
@@ -98,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
98
98
|
requirements:
|
99
99
|
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
101
|
+
version: 2.7.0
|
102
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
104
|
- - ">="
|