haveapi-client 0.27.0 → 0.27.1
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/lib/haveapi/client/communicator.rb +8 -1
- data/lib/haveapi/client/version.rb +1 -1
- data/spec/integration/typed_input_spec.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76af7a26a3c98c60928fc23c3896e5255724e5e2b2e9160d2a88f697cce07e69
|
|
4
|
+
data.tar.gz: 9cd78f4423ccd72bd19745da0486340cc6782c6277593fc5b188209083bf4ece
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d24001fb7089a9b5fbc3677272d0695adbd9a469a99b5e1d78f6925713bc4ccc73f31915f754eaf4fe339f141737f9e82df5a271bfe09c23cac12d63c0ce6139
|
|
7
|
+
data.tar.gz: e341cb82a02a92551be6c4eeb5c055e8391e4e75787fe5a15e24a93f1fa3dc959491a10cea9b4d0cd1e43495fdae01022bd85889a9a9353faaad7e08f023fb4d
|
|
@@ -140,7 +140,14 @@ module HaveAPI::Client
|
|
|
140
140
|
get_params = {}
|
|
141
141
|
|
|
142
142
|
params.each do |k, v|
|
|
143
|
-
|
|
143
|
+
desc = action.input_params&.[](k) || action.input_params&.[](k.to_sym)
|
|
144
|
+
|
|
145
|
+
get_params["#{input_namespace}[#{k}]"] =
|
|
146
|
+
if v.nil? && desc&.[](:type) == 'Resource'
|
|
147
|
+
''
|
|
148
|
+
else
|
|
149
|
+
v
|
|
150
|
+
end
|
|
144
151
|
end
|
|
145
152
|
|
|
146
153
|
if meta
|
|
@@ -110,4 +110,13 @@ RSpec.describe HaveAPI::Client::Client do
|
|
|
110
110
|
expect(err.errors[:t]).to include(a_string_matching(/not a valid string/))
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
|
+
|
|
114
|
+
it 'accepts nil for optional resource params' do
|
|
115
|
+
res = client.test.echo_resource_optional(project: nil)
|
|
116
|
+
|
|
117
|
+
expect(res).to be_a(HaveAPI::Client::Response)
|
|
118
|
+
expect(res[:project_provided]).to be(true)
|
|
119
|
+
expect(res[:project_nil]).to be(true)
|
|
120
|
+
expect(res[:project]).to be_nil
|
|
121
|
+
end
|
|
113
122
|
end
|