Merge pull request #5101 from themetric/fix-api-custom-template

add missing respond_with to some API controllers and add tests