jbuilder-schema 2.6.0 → 2.6.2
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/lib/jbuilder/schema/template.rb +5 -2
- data/lib/jbuilder/schema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ca9a375b705e699e2fd70f4e1b78b034b3d261b2b154edbf27115e726d5063a
|
4
|
+
data.tar.gz: 58b61b54f0fb57d79ec201d5fdae5e6f5fc55f34927e67bf11efa6fb0a5bc95b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a206a642fc33750c2b58b1ab2108a407bed1806158760aea112f6f8ddd6792a2b4be31102cf10ca68eacdafabdcf02bb193e98e6cf81d4e725511a4cfeb70ac
|
7
|
+
data.tar.gz: '078125afab38274a3bbaf13f9562f7f3be3e5497ef9fa26ebedf7c205ab77968f4a4c77b5f53e5f5aedee9f19f7dec6628708602875d2d7086f15c26d1f23e28'
|
@@ -117,7 +117,10 @@ class Jbuilder::Schema
|
|
117
117
|
# Better would be not to set it if it's not needed, but I couldn't figure how,
|
118
118
|
# as we have array of separate object partials hare, so each one of them would legally have allOf key.
|
119
119
|
items = _scope { super(collection, *args, &block) }
|
120
|
-
|
120
|
+
if items.is_a?(::Hash)
|
121
|
+
items = items[:allOf].first if items.key?(:allOf)
|
122
|
+
items = _object(items, _required!(items.keys)) unless items.key?(:$ref) || items.key?(:object)
|
123
|
+
end
|
121
124
|
_attributes.merge! type: :array, items: items
|
122
125
|
end
|
123
126
|
end
|
@@ -180,7 +183,7 @@ class Jbuilder::Schema
|
|
180
183
|
|
181
184
|
def _nullify_non_required_types(attributes, required)
|
182
185
|
attributes.transform_values! {
|
183
|
-
_1[:
|
186
|
+
_1[:type] = [_1[:type], "null"] unless required.include?(attributes.key(_1))
|
184
187
|
_1
|
185
188
|
}
|
186
189
|
end
|
@@ -1,4 +1,4 @@
|
|
1
1
|
# We can't use the standard `Jbuilder::Schema::VERSION =` because
|
2
2
|
# `Jbuilder` isn't a regular module namespace, but a class …which also loads Active Support.
|
3
3
|
# So we use trickery, and assign the proper version once `jbuilder/schema.rb` is loaded.
|
4
|
-
JBUILDER_SCHEMA_VERSION = "2.6.
|
4
|
+
JBUILDER_SCHEMA_VERSION = "2.6.2"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jbuilder-schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuri Sidorov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jbuilder
|