Add: client generator;

Refactor: extract spec validation in a separate module (used both in
loader and client-generator).