Apply 1 suggestion(s) to 1 file(s)
This commit is contained in:
parent
00c4c6a382
commit
70522989d9
1 changed files with 2 additions and 2 deletions
|
@ -28,10 +28,10 @@ def render("show.json", %{object: object, multiple: multiple, options: options}
|
|||
|
||||
def render("show.json", %{object: object} = params) do
|
||||
case object.data do
|
||||
%{"anyOf" => options} when is_list(options) and options != [] ->
|
||||
%{"anyOf" => [ _ | _] = options} ->
|
||||
render(__MODULE__, "show.json", Map.merge(params, %{multiple: true, options: options}))
|
||||
|
||||
%{"oneOf" => options} when is_list(options) and options != [] ->
|
||||
%{"oneOf" => [ _ | _] = options} ->
|
||||
render(__MODULE__, "show.json", Map.merge(params, %{multiple: false, options: options}))
|
||||
|
||||
_ ->
|
||||
|
|
Loading…
Reference in a new issue