jbuilder-schema 2.6.0 → 2.6.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 +4 -4
- data/lib/jbuilder/schema/template.rb +2 -1
- 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: 3739c249efa5efeb070fb651dc9ae83cd6421078272997b34be154c5680a24a9
|
4
|
+
data.tar.gz: 18523b00d2de89fcf36dcb9306826985dad2d9bc72845cdf5c53a74536978bc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24128255cc7873cdf4929ab24bd9f46819fe673cc5bf9c9a2cd9ec161e0a02b8910cb136d6e5410dd8fc9826679dd52d5a7f77ef99111a529bbe428bcc1c8361
|
7
|
+
data.tar.gz: 886edbbc3c763fea1fd312bb682b43884d8d8036d0de74245cef418bae81bbd1954c1efa28bfcaaff7c6a5c2a9d754fd5c9bc5f28dc004f945f9af7212f5eb95
|
@@ -118,6 +118,7 @@ class Jbuilder::Schema
|
|
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
|
items = items[:allOf].first if items.key?(:allOf)
|
121
|
+
items = _object(items, _required!(items.keys)) unless items.key?(:$ref) || items.key?(:object)
|
121
122
|
_attributes.merge! type: :array, items: items
|
122
123
|
end
|
123
124
|
end
|
@@ -180,7 +181,7 @@ class Jbuilder::Schema
|
|
180
181
|
|
181
182
|
def _nullify_non_required_types(attributes, required)
|
182
183
|
attributes.transform_values! {
|
183
|
-
_1[:
|
184
|
+
_1[:type] = [_1[:type], "null"] unless required.include?(attributes.key(_1))
|
184
185
|
_1
|
185
186
|
}
|
186
187
|
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.1"
|
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.1
|
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-10-
|
11
|
+
date: 2023-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jbuilder
|