Input - Referential

Setup

defmodule Foo do
  use(Mazurka.Resource)

  input(foo)

  input(bar, fn value -> [foo, value] end)

  mediatype(Hyper) do
    action() do
      %{"bar" => bar}
    end
  end
end

action

{body, _, _} = Foo.action([], %{}, %{"foo" => "123", "bar" => "456"}, %{})
%{"bar" => ["123", "456"]} = body