rails-param-validation 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f454557e84af9fb83386c6c0cbc2ca4dc107e734694f9372f9773d66a7fb38be
4
- data.tar.gz: 1eb7609cf3c6e1c1c492eaaed2a82b8e6a38434fb9e62dabc550c6db5fc37a0b
3
+ metadata.gz: 611940a379b0bcf38dae5ec17504074523e2a6d169669f0de05623380c6c0ed0
4
+ data.tar.gz: f3e7b0c51e9504a915a36d27b8f9e6289845046fa87d9e5b3d612cc18ca3a498
5
5
  SHA512:
6
- metadata.gz: 48af5864f66cb0268da858d648259bd3098403f6517972a4cf3f44e3fcb5ac728a8e5c20aab6fdb5816a3b6b557a180385d8ab322f947b228531b0830d5469f4
7
- data.tar.gz: 0a7afbd9599bf990e0acf73c8650a09cdf2c7716bf0c22e680ad11e19d9133f6af97b8a701647cd738d28921c8eda9c474ccd53952149e992736cd8507d5a425
6
+ metadata.gz: 3eb0f67d39cda8c5737839abda8f720c559d9faf1062e5a873c8835eb98b9beeb988d461750f997705744eaf3f142376db5e5753d1f88495965126ad22ad9599
7
+ data.tar.gz: fe3696bdfef9b9697c838c26b6314810b0b7a9199da23bbdd874331ed20aca7d78824fd96c61fc4db75c8f9bb1073b61a23c962c72d6281df2f3731d18d84349
@@ -24,15 +24,15 @@ end
24
24
 
25
25
  **query_param**
26
26
 
27
- Parameter passed via query string, e.g. `http://localhost/my_action?parameter=value`. The first value is the parameter name (which must be a symbol), the second is the [type definition](./docs/type-definition.md). The last (optional) parameter to this call is the description.
27
+ Parameter passed via query string, e.g. `http://localhost/my_action?parameter=value`. The first value is the parameter name (which must be a symbol), the second is the [type definition](./type-definition.md). The last (optional) parameter to this call is the description.
28
28
 
29
29
  **path_param**
30
30
 
31
- Parameter passed as part of the actions route, e.g. `http://localhost/my_action/value` where the route definition is something like `get '/my_action/:parameter, to: 'my_controller#my_action'`. The first value is the parameter name (which must be a symbol), the second is the [type definition](./docs/type-definition.md). The last (optional) parameter to this call is the description.
31
+ Parameter passed as part of the actions route, e.g. `http://localhost/my_action/value` where the route definition is something like `get '/my_action/:parameter, to: 'my_controller#my_action'`. The first value is the parameter name (which must be a symbol), the second is the [type definition](./type-definition.md). The last (optional) parameter to this call is the description.
32
32
 
33
33
  **body_param**
34
34
 
35
- Parameter as part of a JSON body in a POST/PUT/PATCH operation. The first value is the parameter name (which must be a symbol) as the JSON body must be a JSON object which has a key named like the parameter. The second parameter is the [type definition](./docs/type-definition.md). The last (optional) parameter to this call is the description.
35
+ Parameter as part of a JSON body in a POST/PUT/PATCH operation. The first value is the parameter name (which must be a symbol) as the JSON body must be a JSON object which has a key named like the parameter. The second parameter is the [type definition](./type-definition.md). The last (optional) parameter to this call is the description.
36
36
 
37
37
  Example body:
38
38
 
@@ -55,7 +55,7 @@ end
55
55
 
56
56
  **response**
57
57
 
58
- The response annotation defines the possible responses the action can generate, where the first parameter is the HTTP status code, the second is the [type definition](./docs/type-definition.md). The last (optional) parameter to this call is the description.
58
+ The response annotation defines the possible responses the action can generate, where the first parameter is the HTTP status code, the second is the [type definition](./type-definition.md). The last (optional) parameter to this call is the description.
59
59
 
60
60
  **accept_all_params**
61
61
 
@@ -1,5 +1,9 @@
1
1
  module RailsParamValidation
2
2
 
3
+ def self.register(type, schema)
4
+ AnnotationTypes::CustomT.register type, schema
5
+ end
6
+
3
7
  module AnnotationTypes
4
8
  class AnnotationT
5
9
  attr_reader :inner_type
@@ -1,3 +1,3 @@
1
1
  module RailsParamValidation
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-param-validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oskar Kirmis