json_schema-faker 0.6.1 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +36 -26
- data/VERSION +1 -1
- data/json_schema-faker.gemspec +1 -1
- data/lib/json_schema/faker/formats.rb +2 -2
- data/lib/json_schema/faker/util.rb +2 -2
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 825732f967f977c99909ab3e10c9f9436d666f38091dca7dffdd1e87578a15aa
|
4
|
+
data.tar.gz: 571940be85e56f8d730219ab8863fba0febe0e3c9dcf6e81f14271515c90dda1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4d8bd7a1b5591e7952d19845b2bcafdaeb76a2973c1cea6beb53e1eb4b20531315f45c867be1e9457412082e62ba5ddd1e29ac3b4a9a30b9b951ae51c5b316f
|
7
|
+
data.tar.gz: d34567b9bc89aeab2df034e8228a1403ac72a6381962e22b416337b7c8b8fa7ee4afcdfad2b8c7d5d783252627cb0b4eb7fbe632ab570637b37d384d2a2c1d1e
|
data/CHANGELOG.md
CHANGED
@@ -1,55 +1,65 @@
|
|
1
|
+
## 0.6.3
|
2
|
+
|
3
|
+
- Fixed
|
4
|
+
- #18
|
5
|
+
|
6
|
+
## 0.6.2
|
7
|
+
|
8
|
+
- Fixed
|
9
|
+
- #16
|
10
|
+
|
1
11
|
## 0.6.1
|
2
12
|
|
3
|
-
|
4
|
-
|
13
|
+
- Fixed
|
14
|
+
- hint-example descending
|
5
15
|
|
6
16
|
## 0.6.0
|
7
17
|
|
8
|
-
|
9
|
-
|
10
|
-
|
18
|
+
- Added
|
19
|
+
- support of default faker against format
|
20
|
+
- support for copying format in take_logical_and_of_schema
|
11
21
|
|
12
22
|
## 0.5.2
|
13
23
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
24
|
+
- Added
|
25
|
+
- support of schema dependency for JsonSchema::Faker::Strategy::Simple
|
26
|
+
- validate default and return only if valid
|
27
|
+
- Fixed
|
28
|
+
- fixes bug of disruption in JsonSchema::Faker::Util.take_logical_and_of_schema
|
29
|
+
- fixes bug of not merged in JsonSchema::Faker::Strategy::Simple#compact_schema
|
20
30
|
|
21
31
|
## 0.5.1
|
22
32
|
|
23
|
-
|
24
|
-
|
33
|
+
- Added
|
34
|
+
- support for copying pattern in take_logical_and_of_schema
|
25
35
|
|
26
36
|
## 0.5.0
|
27
37
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
38
|
+
- Added
|
39
|
+
- ::JsonSchema::Faker::Util. utility for json_schema
|
40
|
+
- Removed
|
41
|
+
- ::JsonSchema::Faker::Strategy::Simple.merge_schema! is removed. use ::JsonSchema::Faker::Util.take_logical_and_of_schema instead.
|
32
42
|
|
33
43
|
## 0.4.0
|
34
44
|
|
35
|
-
|
36
|
-
|
45
|
+
- Added
|
46
|
+
- Greedy strategy to use properties as much as possible (suitable to response generation)
|
37
47
|
|
38
48
|
## 0.3.0
|
39
49
|
|
40
|
-
|
41
|
-
|
50
|
+
- Added
|
51
|
+
- can add faker to format
|
42
52
|
|
43
53
|
## 0.2.0
|
44
54
|
|
45
|
-
|
46
|
-
|
55
|
+
- Added
|
56
|
+
- support example as hint
|
47
57
|
|
48
58
|
## 0.1.1
|
49
59
|
|
50
|
-
|
51
|
-
|
60
|
+
- Added
|
61
|
+
- refactor and improve generation
|
52
62
|
|
53
63
|
## 0.1.0
|
54
64
|
|
55
|
-
|
65
|
+
- initial release
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.3
|
data/json_schema-faker.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.add_dependency "pxeger"
|
20
20
|
spec.add_dependency "faker"
|
21
21
|
|
22
|
-
spec.add_development_dependency "bundler"
|
22
|
+
spec.add_development_dependency "bundler"
|
23
23
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
24
|
|
25
25
|
# test
|
@@ -16,7 +16,7 @@ class JsonSchema::Faker
|
|
16
16
|
def email(schema, hint: nil, position: nil)
|
17
17
|
raise "invalid schema given" unless schema.format == "email"
|
18
18
|
|
19
|
-
(hint && hint[:example]) || ::Faker::Internet.
|
19
|
+
(hint && hint[:example]) || ::Faker::Internet.email
|
20
20
|
end
|
21
21
|
|
22
22
|
# https://tools.ietf.org/html/rfc2606
|
@@ -53,7 +53,7 @@ class JsonSchema::Faker
|
|
53
53
|
raise "invalid schema given" unless schema.format == "uri"
|
54
54
|
|
55
55
|
# TODO: urn
|
56
|
-
(hint && hint[:example]) || ::Faker::Internet.url(safe_domain)
|
56
|
+
(hint && hint[:example]) || ::Faker::Internet.url(host: safe_domain)
|
57
57
|
end
|
58
58
|
|
59
59
|
protected def safe_domain
|
@@ -105,7 +105,7 @@ class JsonSchema::Faker
|
|
105
105
|
a.additonal_items = false
|
106
106
|
else
|
107
107
|
if b.additional_items.is_a?(::JsonSchema::Schema)
|
108
|
-
if a.additional_items.is_a?(::
|
108
|
+
if a.additional_items.is_a?(::JsonSchema::Schema)
|
109
109
|
::JsonSchema::Faker::Configuration.logger.warn "not support merging additionalItems" if ::JsonSchema::Faker::Configuration.logger
|
110
110
|
else
|
111
111
|
a.additional_items = b.additional_items
|
@@ -157,7 +157,7 @@ class JsonSchema::Faker
|
|
157
157
|
a.additional_properties = false
|
158
158
|
else
|
159
159
|
if b.additional_properties.is_a?(::JsonSchema::Schema)
|
160
|
-
if a.additional_properties.is_a?(::
|
160
|
+
if a.additional_properties.is_a?(::JsonSchema::Schema)
|
161
161
|
::JsonSchema::Faker::Configuration.logger.warn "not support merging additionalProperties" if ::JsonSchema::Faker::Configuration.logger
|
162
162
|
else
|
163
163
|
a.additional_properties = b.additional_properties
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_schema-faker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- okitan
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json_schema
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -197,7 +197,7 @@ homepage: https://github.com/okitan/json_schema-faker
|
|
197
197
|
licenses:
|
198
198
|
- MIT
|
199
199
|
metadata: {}
|
200
|
-
post_install_message:
|
200
|
+
post_install_message:
|
201
201
|
rdoc_options: []
|
202
202
|
require_paths:
|
203
203
|
- lib
|
@@ -212,9 +212,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
|
-
|
216
|
-
|
217
|
-
signing_key:
|
215
|
+
rubygems_version: 3.1.6
|
216
|
+
signing_key:
|
218
217
|
specification_version: 4
|
219
218
|
summary: generate fake data from json schema
|
220
219
|
test_files: []
|