defmodule ExMoney.Web.Api.V2.CategoryView do
  use ExMoney.Web, :view

  alias ExMoney.Web.Api.V2.CategoryView

  def render("index.json", %{categories: categories}) do
    render_many(categories, CategoryView, "category.json")
  end

  def render("category.json", %{category: category}) do
    %{
       id: category.id,
       name: category.name,
     }
  end
end

defmodule ExMoney.Web.Api.V2.CategoryView do
  use ExMoney.Web, :view

  alias ExMoney.Web.Api.V2.CategoryView

  def render("index.json", %{categories: categories}) do
    render_many(categories, CategoryView, "category.json")
  end

  def render("category.json", %{category: category}) do
    %{
       id: category.id,
       name: category.name,
       human_name: category.humanized_name,
       parent_id: category.parent_id
     }
  end
end

Add parent_id and human_name to category api v2
Add parent_id and human_name to category api v2

gaynetdinov/ex_money,gaynetdinov/ex_money