title: Phoenix.Template.UndefinedError at GET /api/todos Could not render "index.json"
body: <h1>Problem</h1>
  <p><strong>localhost:4000/api/todos</strong> shows an error</p>
  <blockquote>
  <p>Phoenix.Template.UndefinedError at GET /api/todos
  Could not render &quot;index.json&quot;</p>
  </blockquote>
  <h2>Code</h2>
  <p><strong>todo_view.ex</strong></p>
  <pre class="lang-erl prettyprint-override"><code>defmodule TodoApiWeb.TodoView do
    use TodoApiWeb, :view
    alias TodoApiWeb.TodoView
  
    def render('index.json', %{todos: todos}) do
      render_many(todos, TodoView, &quot;todo.json&quot;)
    end
  
    def render('todo.json', %{todo: todo}) do
      %{
        id: todo.id,
      }
    end
  end
  </code></pre>