typed_params 1.2.5 → 1.2.7
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 +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +2 -2
- data/lib/typed_params/formatters/jsonapi.rb +1 -1
- data/lib/typed_params/validator.rb +1 -1
- data/lib/typed_params/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6f336626eb409c9c4fcb45b2a3cb56c01bf5a08c8f82eafb57d21d3721e7ad1
|
4
|
+
data.tar.gz: 54e0b4b15c6b99a3d8abca95f7e12892245c7c334551aba158b0797588f77904
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57378c5f785cf126d5284c42334663b8a89e322097168d2776d63188481b227d1491168574c557b1e58def51e561dbc181f767073f74b3a510817921f1cca4fc
|
7
|
+
data.tar.gz: 66e21d13ecf91c3a4b15f09ee7d054ad88bcc0d62fd51218fc460463ac32d9878d701bdd0cd08c511ba919cb6b63d743a8d9a444906ca9961a7eb537b4db83cc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.2.7
|
4
|
+
|
5
|
+
- Fix issue where the JSONAPI formatter did not ignore `meta` when `data` is omitted.
|
6
|
+
|
7
|
+
## 1.2.6
|
8
|
+
|
9
|
+
- Fix issue where an empty param of type `hash` or `array` would not raise when a required but `allow_nil` child param was missing.
|
10
|
+
|
3
11
|
## 1.2.5
|
4
12
|
|
5
13
|
- Fix issue where a `minimum` and `maximum` constraint combo was not asserted by the `length:` validator.
|
@@ -10,7 +18,7 @@
|
|
10
18
|
|
11
19
|
## 1.2.3
|
12
20
|
|
13
|
-
- Remove `alias` from child lookup criteria in JSONAPI
|
21
|
+
- Remove `alias` from child lookup criteria in JSONAPI formatter.
|
14
22
|
|
15
23
|
## 1.2.2
|
16
24
|
|
data/README.md
CHANGED
@@ -44,7 +44,7 @@ Sponsored by:
|
|
44
44
|
</div>
|
45
45
|
</a>
|
46
46
|
|
47
|
-
|
47
|
+
_A fair source software licensing and distribution API._
|
48
48
|
|
49
49
|
__
|
50
50
|
|
@@ -155,7 +155,7 @@ class UsersController < ApplicationController
|
|
155
155
|
end
|
156
156
|
}
|
157
157
|
def create
|
158
|
-
user = User.new(
|
158
|
+
user = User.new(typed_params[:user])
|
159
159
|
|
160
160
|
if user.save
|
161
161
|
render_created user, location: v1_user_url(user)
|
@@ -6,7 +6,7 @@ module TypedParams
|
|
6
6
|
class Validator < Mapper
|
7
7
|
def call(params)
|
8
8
|
raise InvalidParameterError.new('is missing', path: schema.path, source: schema.source) if
|
9
|
-
params.nil? && schema.required?
|
9
|
+
params.nil? && schema.required?
|
10
10
|
|
11
11
|
depth_first_map(params) do |param|
|
12
12
|
schema = param.schema
|
data/lib/typed_params/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typed_params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeke Gabrielse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
121
|
+
rubygems_version: 3.5.11
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Define structured and strongly-typed parameter schemas for your Rails controllers.
|