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}))
_ ->