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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff83851eec45e830cd251fa2a886722d6968373ce94f3a84eef45b47b3c67351
4
- data.tar.gz: 47f08d63b04dad171ff357ca3ce31433d586bd5da1adc95560395783e687a80b
3
+ metadata.gz: 8deba22f3280f1a4c5f01b83121402cd83822afb8602504a319faeb20ec10d8d
4
+ data.tar.gz: 9723defcab7d274fd354d00d8d60f0a1c04bd4e3de0750ee932fe4b6237c7456
5
5
  SHA512:
6
- metadata.gz: c3ceb0d67668c8f4b02a3269c450c9800b9c63821b1904d14992b50d06475bc911b0bb6b5b3a5fe7d26db97aa03e164fe877ec533058c7426eea520027e90d6f
7
- data.tar.gz: c505148ce9101eebf71c145f000abd8e45aa6501c4832cc39e03d43b0a734890d70cdf53a13226c8653ba4bee847d566672d4f139075d003b046a944b6fa54a4
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. Swaggerize
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
 
@@ -1,3 +1,3 @@
1
1
  module TypedParameter
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.6.0'.freeze
3
3
  end
@@ -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 = '>= 3.0.0'
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.5.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: 3.0.0
101
+ version: 2.7.0
102
102
  required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  requirements:
104
104
  - - ">="