Fix entity generation to be RESTful