json-schema_builder 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json/schema_builder/entity.rb +1 -1
- data/lib/json/schema_builder/version.rb +1 -1
- data/spec/unit/object_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f12a6684d1d6a4473cb6d639ae914d55e9a14e1
|
4
|
+
data.tar.gz: 12d20f46dc863f26ac108f99f8fa76e10c68c4b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73e54fa0ab098ccbd5fe7f30de744c766517e58f59879d7af8e9264457c37629f62ed2af82c342eb76eed8a8fc640ef176e0a0d809305faf4a75d4f7ba9ebf29
|
7
|
+
data.tar.gz: 68d641015f025bd2302372503fabaecf71ec150c3aad7a4aa74414906ce0c18f3cfc3a5106f7fca4dae3401410ee46d7bf0d2ce0c1b76349f16b0b9e20886b34
|
data/spec/unit/object_spec.rb
CHANGED
@@ -29,4 +29,16 @@ RSpec.describe JSON::SchemaBuilder::Object, type: :unit do
|
|
29
29
|
its('pattern_properties'){ is_expected.to include '^_' => { 'type' => 'string' } }
|
30
30
|
its('pattern_properties'){ is_expected.to include '^\.' => { 'type' => 'string' } }
|
31
31
|
end
|
32
|
+
|
33
|
+
describe "#required" do
|
34
|
+
subject do
|
35
|
+
described_class.new 'name' do
|
36
|
+
string :test1, required: true
|
37
|
+
string :test2, required: false
|
38
|
+
string :test2, required: nil
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
its(:required) { is_expected.to match_array([:test1]) }
|
43
|
+
end
|
32
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json-schema_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Parrish
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|