`CopyDirective` operates on whole sub-elements (slots/classes/enums). There's currently no way to copy a slot and then modify one of its attributes — e.g. change a slot's range from string to a class and clear the now-stale `pattern`.
Use case from #67 (turbomam): take a source schema's class `C` with string-range slot `S` (with a regex `pattern`), and emit a target schema where `S`'s range is changed to a structured object/class instance with the `pattern` removed.
Likely mechanism: `SlotDerivation.target_definition` (already exists) should support clearing/overriding attributes on a copied slot, not just on a freshly-defined one. Needs investigation of current behavior.
Spun out of #67 / #244.
`CopyDirective` operates on whole sub-elements (slots/classes/enums). There's currently no way to copy a slot and then modify one of its attributes — e.g. change a slot's range from string to a class and clear the now-stale `pattern`.
Use case from #67 (turbomam): take a source schema's class `C` with string-range slot `S` (with a regex `pattern`), and emit a target schema where `S`'s range is changed to a structured object/class instance with the `pattern` removed.
Likely mechanism: `SlotDerivation.target_definition` (already exists) should support clearing/overriding attributes on a copied slot, not just on a freshly-defined one. Needs investigation of current behavior.
Spun out of #67 / #244.