Allow to register class with fields spec