The templates etc are all lifted from the RestSharp based codegen, they need reviewing and refactoring.