jsonschema-generator 0.1.2 → 0.1.3

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: b30dcc6771904bbd512f87b075082bc0a854057a5fd1386e3db085c97a52b3d0
4
- data.tar.gz: 52730cfee888c5e8e82c518a3e16b847cfa93f180429d9599efbec1dbcdfb5da
3
+ metadata.gz: 03a6de2ffbaeb37ace028ca47a7151f2a026f8ed9d3107d7d1a7d0ffc74f4e7d
4
+ data.tar.gz: 12f2811a2e7fe09f4e2c66ee13464746f110e73cd62684b7974a80e914ced74c
5
5
  SHA512:
6
- metadata.gz: 590722f57fdd8be9092c6a12a1e34b897075142a96a4e360e7bd8902c03496c2b0aaf024cd5da1f3886cf87c9452bcdb89e74800f44170420fc18256a7c3603b
7
- data.tar.gz: 3d7e6ac9da493f64833fcbd56989c3d85f576fea7c1c5e4ee4b61c5499310710bebf882c0e6ae55a52eb1c62827736315d7f141ffa06377e6d4b6388018c4406
6
+ metadata.gz: 8fa07b4b88865ffb83edcb35bcc007c30142857759e2b478c9d6789490cd17b3e15a6094a463e94d72a7464c39a437f72c937d9e1ac6f48b8d8e414028a2d54a
7
+ data.tar.gz: e0fa99ba74548f902eee5cc5ad017fabd5c7ca492e2735eaf4154b8e5c49d63243939d3fcb85aa0341735e7477355e59b1cca6eb46c4e7a94546047a2dd9e4f7
@@ -52,7 +52,11 @@ module Jsonschema
52
52
  end
53
53
 
54
54
  def generate_array(array)
55
- params = { 'items' => {}, 'type' => 'array' }
55
+ params = {
56
+ 'type' => 'array',
57
+ 'minItems' => array.size,
58
+ 'items' => {},
59
+ }
56
60
 
57
61
  array.each_with_object(params) do |elem, memo|
58
62
  memo['items'].merge!(generate(elem))
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jsonschema
4
4
  module Generator
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonschema-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Bykov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-01 00:00:00.000000000 Z
11
+ date: 2019-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  - !ruby/object:Gem::Version
169
169
  version: '0'
170
170
  requirements: []
171
- rubygems_version: 3.0.1
171
+ rubygems_version: 3.0.3
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Generate JSON schema from JSON.