Skip to content

Commit 6cdeb19

Browse files
jonalmtanmaykm
andauthored
fix set_param (#68)
* fix set_param * remove prefix * add comments into code Co-authored-by: Tanmay Mohapatra <[email protected]> --------- Co-authored-by: Tanmay Mohapatra <[email protected]>
1 parent 48a9fff commit 6cdeb19

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/client.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,13 @@ end
293293

294294
set_param(params::Dict{String,String}, name::String, value::Nothing; collection_format=",") = nothing
295295
function set_param(params::Dict{String,String}, name::String, value; collection_format=",")
296-
if !isa(value, Vector) || isempty(collection_format)
296+
if isa(value, Dict)
297+
# implements the default serialization (style=form, explode=true, location=queryparams)
298+
# as mentioned in https://swagger.io/docs/specification/serialization/
299+
for (k, v) in value
300+
params[k] = string(v)
301+
end
302+
elseif !isa(value, Vector) || isempty(collection_format)
297303
params[name] = string(value)
298304
else
299305
dlm = get(COLL_DLM, collection_format, ",")

0 commit comments

Comments
 (0)