api.array :wiki_pages do
  @pages.each do |page|
    api.wiki_page do
      api.title page.title
      if page.parent
        api.parent :title => page.parent.title
      end
      api.version page.version
      api.project(:id => page.project_id, :name => page.project.name) unless page.project.nil?
      api.created_on page.created_on
      api.updated_on page.updated_on
    end
  end
end
