added rest client as a runtime dependency
added base class
modified generator to fix bugs