OpenAssetIO / OpenAssetIO-TraitGen

A code generation tool that produces OpenAssetIO Traits and Specifications from a simple YAML description.
Apache License 2.0
5 stars 3 forks source link

Specification "inheritance" #65

Open foundrytom opened 7 months ago

foundrytom commented 7 months ago

What

Determine if/what a mechanism would look like that helps people create new specifications that extend existing ones.

For example, extending an ImageSpecification with another trait to make a TextureSpecification

Why

Presently, you have to copy-paste all the traits, which introduces the possibility of error, and precludes any easy way to follow (or even observe) the intended dependency.

feltech commented 5 months ago

If Specifications didn't list traits but instead had a mapping of trait ID to something (e.g. version), then Specification "inheritance" could work using YAML anchors and aliases to merge in the traits of a "parent" Specification.

Cross-schema inheritance would need a concatenated YAML, though.