foobara-json-schema-generator 1.0.1 → 1.1.0
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/CHANGELOG.md +4 -0
- data/src/json_schema_generator.rb +9 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ada8b771c3996667179a91f625b5bf8855b1b11f9d99dcfdf29405b9da00c29
|
4
|
+
data.tar.gz: d9155a94bcca4a28915ea69f4cae3f1d8bda4449b0f7537f1c851df6f446c887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 961ba1ff36e550f777555be5192b1e59cfc00e58ffab897c5f4301795bc09eb0dbaf0f2bfa5c7363c6318cc54ae7cbb208dedb32e90c0863ad8c480fd8b45ad6
|
7
|
+
data.tar.gz: 807fefe285419e4a1361bf701a8849c497804e17d2de012af5ab57a9e5d55c8a57f469fe06fdf5d56ed1ce68890d3f1a473e89dac5fb5a2d38390268129c335d
|
data/CHANGELOG.md
CHANGED
@@ -117,16 +117,18 @@ module Foobara
|
|
117
117
|
# :nocov:
|
118
118
|
end
|
119
119
|
|
120
|
-
|
120
|
+
unless type.primitive?
|
121
|
+
one_of = DataPath.value_at(:one_of, declaration_data)
|
121
122
|
|
122
|
-
|
123
|
-
|
124
|
-
|
123
|
+
if one_of&.any?
|
124
|
+
type_hash[:enum] = one_of
|
125
|
+
end
|
125
126
|
|
126
|
-
|
127
|
+
allow_nil = DataPath.value_at(:allow_nil, declaration_data)
|
127
128
|
|
128
|
-
|
129
|
-
|
129
|
+
if allow_nil && type_hash.key?(:type)
|
130
|
+
type_hash[:type] = [type_hash[:type], "null"]
|
131
|
+
end
|
130
132
|
end
|
131
133
|
|
132
134
|
if description
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-json-schema-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
@@ -15,7 +15,7 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 0.
|
18
|
+
version: 0.1.1
|
19
19
|
- - "<"
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 2.0.0
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.1.1
|
29
29
|
- - "<"
|
30
30
|
- !ruby/object:Gem::Version
|
31
31
|
version: 2.0.0
|