Add getRootResource method

This method avoids to write multiple repetitive routes for resources.