jsonapionify 0.12.3 → 0.12.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
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTNiZDQwMzc2MWI0NGI3MmQyYzFjYzI5YWZkMmZmZmRkOGZlNDIyOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDMzNjk2OGFiZTJhZjM5NDNiNjcwMGIxY2NiZWUwMWViOGMwNjUzOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmNhZGM4NmExYTBiODJiOGZmYTdiNGRkODViMTNhOGIzNWE0MTc2OWE3M2Zk
|
10
|
+
OTZlZjg2MjMxMjUwZTNiMjI1OTRiMTMzZDZhOTE1Mzc5YWM0MGVjMWFmOTZl
|
11
|
+
NGFlYzRkN2RmOGI0YTY5M2RkN2I4YjlmNjJmZmMwZDFiZjU0NmE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDkxZWQ1MDkyMjRmODllMzhlOTY5MzA0YmQxODUzMTk4MjNlYWU1YjZkMGU1
|
14
|
+
ZTU5MzE1NGYxN2NhOTRkMjEzYzk5MjQ5ZjJkNDE3YThjOWEyYTBlYzk2Mzkz
|
15
|
+
YTY2MTcxMWViYTJiZWY0ODgwMjZhZjIyMWZmZTc4YTA1YjVkZDk=
|
@@ -65,13 +65,6 @@ module JSONAPIonify::Api
|
|
65
65
|
detail "attribute not permitted: #{attribute}"
|
66
66
|
end
|
67
67
|
|
68
|
-
error :attributes_missing do
|
69
|
-
pointer 'data'
|
70
|
-
title 'missing Member'
|
71
|
-
detail 'missing attributes member'
|
72
|
-
status '422'
|
73
|
-
end
|
74
|
-
|
75
68
|
error :include_parameter_invalid do
|
76
69
|
parameter 'sort'
|
77
70
|
title 'include parameter is invalid'
|
@@ -24,9 +24,7 @@ module JSONAPIonify::Api
|
|
24
24
|
context(:request_attributes, readonly: true, persisted: true) do |context, request:, action_name:, id:, request_data:|
|
25
25
|
should_error = false
|
26
26
|
|
27
|
-
request_attributes = request_data.fetch(:attributes)
|
28
|
-
error_now :attributes_missing
|
29
|
-
end
|
27
|
+
request_attributes = request_data.fetch(:attributes, {})
|
30
28
|
|
31
29
|
# Check for required attributes
|
32
30
|
self.attributes.each do |attr|
|
@@ -100,7 +100,7 @@ module JSONAPIonify::Structure
|
|
100
100
|
keys += self.keys.select(&block) if block_given?
|
101
101
|
valid_keys = keys.map(&:to_sym) & self.keys.map(&:to_sym)
|
102
102
|
unless valid_keys.present?
|
103
|
-
errors.add('*', "must contain one of: #{keys_to_sentence(*
|
103
|
+
errors.add('*', "must contain one of: #{keys_to_sentence(*self.keys)}")
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
data/lib/jsonapionify/version.rb
CHANGED