Fixed bugs with the REST API and client model generation.