Skip to content

Override or clear individual attributes of a copied slot/class #246

@amc-corey-cox

Description

@amc-corey-cox

`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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions