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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 941cc81aba10dd18bb19c8b8427033e76247b4487e827aba21c77c71b5b5ed79
4
- data.tar.gz: 30d402402fe3ba09559aebfc141f6b770afd7c944a895cb9e6c1ce7b01dc7859
3
+ metadata.gz: 3ada8b771c3996667179a91f625b5bf8855b1b11f9d99dcfdf29405b9da00c29
4
+ data.tar.gz: d9155a94bcca4a28915ea69f4cae3f1d8bda4449b0f7537f1c851df6f446c887
5
5
  SHA512:
6
- metadata.gz: 8687222ac9cd86b7792aff4b6a2604172ba1c191e81fc0c88a487685cb016b2e73150bb5b5387e2f8aa77b7dab45f3ffaef63d1bba646851ec426f4e5581209e
7
- data.tar.gz: 4921a18e39e14b4dd9e5ae3fb41af9cc6eee0e045da79ff836e5b452e9c9b7131d7b30020d35fecd668c84c43bcc499726da48044d814cbcb88d1e634a59bd41
6
+ metadata.gz: 961ba1ff36e550f777555be5192b1e59cfc00e58ffab897c5f4301795bc09eb0dbaf0f2bfa5c7363c6318cc54ae7cbb208dedb32e90c0863ad8c480fd8b45ad6
7
+ data.tar.gz: 807fefe285419e4a1361bf701a8849c497804e17d2de012af5ab57a9e5d55c8a57f469fe06fdf5d56ed1ce68890d3f1a473e89dac5fb5a2d38390268129c335d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.1.0] - 2025-08-22
2
+
3
+ - Handle Foobara 0.1.0 declaration changes
4
+
1
5
  ## [1.0.1] - 2025-07-12
2
6
 
3
7
  - Add support for tuples
@@ -117,16 +117,18 @@ module Foobara
117
117
  # :nocov:
118
118
  end
119
119
 
120
- one_of = DataPath.value_at(:one_of, declaration_data)
120
+ unless type.primitive?
121
+ one_of = DataPath.value_at(:one_of, declaration_data)
121
122
 
122
- if one_of&.any?
123
- type_hash[:enum] = one_of
124
- end
123
+ if one_of&.any?
124
+ type_hash[:enum] = one_of
125
+ end
125
126
 
126
- allow_nil = DataPath.value_at(:allow_nil, declaration_data)
127
+ allow_nil = DataPath.value_at(:allow_nil, declaration_data)
127
128
 
128
- if allow_nil && type_hash.key?(:type)
129
- type_hash[:type] = [type_hash[:type], "null"]
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.1
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.0.136
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.0.136
28
+ version: 0.1.1
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
31
  version: 2.0.0