jsonapi-realizer 6.2.4 → 6.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdedd4d38134e7c8f572f6e4583d7d6276fc4a6e27f67964b548992d63b67272
|
4
|
+
data.tar.gz: 2c6f6d1d40732ec66681da213f7ea19dd9c8e6cf8c5dcc460b58ea1f2c15cdea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 294c15608987a6d521438a56b070c98d4b7b3d432bc47562d995102b95107c4d27ab2b5b1b45c1a4c2950349db5631b3f4a6f4cb624b207e8337371192b0fd59
|
7
|
+
data.tar.gz: 5fba1d580be4e3a7270214ec1a847a9ddf5bb2fe4f618c6f889820c2bb1ef5ec5dd721531e95f3cf958991dc408070855b93664d6b885cd36ec82d4c108d05d2
|
@@ -6,9 +6,14 @@ module JSONAPI
|
|
6
6
|
class ResourceRelationshipNotFound < Error
|
7
7
|
attr_accessor(:name)
|
8
8
|
attr_accessor(:realizer)
|
9
|
+
attr_accessor(:key)
|
9
10
|
|
10
11
|
def message
|
11
|
-
|
12
|
+
if key
|
13
|
+
"#{realizer} doesn't define the relationship #{name} with #{key}"
|
14
|
+
else
|
15
|
+
"#{realizer} doesn't define the relationship #{name}"
|
16
|
+
end
|
12
17
|
end
|
13
18
|
end
|
14
19
|
end
|
@@ -27,8 +27,8 @@ module JSONAPI
|
|
27
27
|
end
|
28
28
|
|
29
29
|
validates_presence_of(:intent)
|
30
|
-
validates_presence_of(:parameters, allow_empty: true)
|
31
|
-
validates_presence_of(:headers, allow_empty: true)
|
30
|
+
validates_presence_of(:parameters, allow_empty: true, allow_blank: true)
|
31
|
+
validates_presence_of(:headers, allow_empty: true, allow_blank: true)
|
32
32
|
|
33
33
|
identifier(JSONAPI::Realizer.configuration.default_identifier)
|
34
34
|
|
@@ -155,6 +155,8 @@ module JSONAPI
|
|
155
155
|
end.first
|
156
156
|
end
|
157
157
|
# [["account", "photographs"], ["comments"], ["comments", "account"]]
|
158
|
+
rescue Error::ResourceRelationshipNotFound => _relationship_not_found
|
159
|
+
raise(Error::ResourceRelationshipNotFound, name:, materializer: self, key: "include")
|
158
160
|
end
|
159
161
|
|
160
162
|
def selects?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi-realizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kurtis Rainbolt-Greene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|