completed cosmo rest client and integration with swagger codegen