jbuilder-schema 2.6.0 → 2.6.1

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: ee4548cc207982dd75132d63f96e9396757af0b812b8649fb648cf978de0c4a7
4
- data.tar.gz: fa0b95d49b9b0cb1cde94381bc0f217b08f89900d1b7f2bac72e9e3e2cd6ab41
3
+ metadata.gz: 3739c249efa5efeb070fb651dc9ae83cd6421078272997b34be154c5680a24a9
4
+ data.tar.gz: 18523b00d2de89fcf36dcb9306826985dad2d9bc72845cdf5c53a74536978bc1
5
5
  SHA512:
6
- metadata.gz: e7d4fd3b56407c18a94877387f92f7c53f8632f0c610a7595bb567ec380454b72de0be3c68be5f17d9ece12dc78785aabb965a9a44d078b78b2d25e043c8b93c
7
- data.tar.gz: 33ed871b094e1bb4103c7e07f4ab949ca9e595fa959433f449aed6e1f81a6b6f85d29da22b4185baee392a9385fdbd20035d0d8b045801844c9d1751675b371e
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[:nullable] = true unless required.include?(attributes.key(_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.0"
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.0
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-27 00:00:00.000000000 Z
11
+ date: 2023-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jbuilder