Avoid some side effects of default_factory by calling it only once if possible and by not setting a default value in the schema