legacyschema: Restore code generation
Created by: tsenart
The legacyschema package is missing its generation abilities. This commit adds it back.
Extracted from #1391
NOCHANGELOG
Created by: tsenart
The legacyschema package is missing its generation abilities. This commit adds it back.
Extracted from #1391
NOCHANGELOG