Skip to content

Commit

Permalink
handle oneOf in array items
Browse files Browse the repository at this point in the history
Signed-off-by: Outscale Bot <[email protected]>
  • Loading branch information
Open-Source-Bot authored and outscale-mgo committed Oct 19, 2023
1 parent 7052f0a commit 6b3cab8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hacks/patch-nooneof.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
arg_info[key] = val
end
arg_info.delete("oneOf")
elsif arg_info.key?("items") and arg_info["items"].key?("oneOf") then
arg_info["items"]["oneOf"][0].each do |key, val|
arg_info["items"] = val
end
arg_info["items"].delete("oneOf")
end
end
end
Expand Down
5 changes: 5 additions & 0 deletions hacks/patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
arg_info[key] = val
end
arg_info.delete("oneOf")
elsif arg_info.key?("items") and arg_info["items"].key?("oneOf") then
arg_info["items"]["oneOf"][0].each do |key, val|
arg_info["items"] = val
end
arg_info["items"].delete("oneOf")
end
if old_schema.key?(call_name) then
old_arg_prop = old_schema[call_name]["properties"]
Expand Down

0 comments on commit 6b3cab8

Please sign in to comment.