By deprecating, rather than deleting, schema elements, we ensure backward compatibility, extend user
trust, and provide a valuable historical record, aiding in understanding the model's evolution.
But we also want to be able to use standard LinkML toolchains to validate, generate serializations, etc. without the deprecated elements (except in cases where we want to preserve deprecated elements for use by stable identifiers).
If we were to take the general approach of creating a 'deprecation.yaml' that sits in the schema directory and holds all the deprecated elements of a schema, it would be easy to import that into the main schema file (and use standard toolchains for making serializations that include the deprecated elements -- e.g. in docgen where we produce IRIs). But, at some point, we won't want data generated using deprecated elements to validate, nor will we want to produce JSONSchema or SQL with deprecated elements.
A couple of options (looking for feedback):
linkml-validate and the other generators should handle 'deprecated' metamodel element independently (e.g. validator can throw an error, each generator can skip the deprecated element, etc.)
create a 'linkml-import' cli method to optionally import the 'deprecation.yaml' to the scheme during generation of specific serializations only (like docgen).
• Medium - can do work without it; but it's important (e.g. to save time or for convenience)
• Short-term - 2-4 weeks
By deprecating, rather than deleting, schema elements, we ensure backward compatibility, extend user trust, and provide a valuable historical record, aiding in understanding the model's evolution.
But we also want to be able to use standard LinkML toolchains to validate, generate serializations, etc. without the deprecated elements (except in cases where we want to preserve deprecated elements for use by stable identifiers).
If we were to take the general approach of creating a 'deprecation.yaml' that sits in the schema directory and holds all the deprecated elements of a schema, it would be easy to import that into the main schema file (and use standard toolchains for making serializations that include the deprecated elements -- e.g. in docgen where we produce IRIs). But, at some point, we won't want data generated using deprecated elements to validate, nor will we want to produce JSONSchema or SQL with deprecated elements.
A couple of options (looking for feedback):
linkml-validate and the other generators should handle 'deprecated' metamodel element independently (e.g. validator can throw an error, each generator can skip the deprecated element, etc.)
create a 'linkml-import' cli method to optionally import the 'deprecation.yaml' to the scheme during generation of specific serializations only (like docgen).
• Medium - can do work without it; but it's important (e.g. to save time or for convenience) • Short-term - 2-4 weeks