-
Notifications
You must be signed in to change notification settings - Fork 319
Description
What
Allow autoentities.template to reference external metadata files using the new @file() syntax.
This enhancement allows auto-generated entities to inherit descriptions or other metadata from configuration-managed metadata files.
This enhancement depends on the following:
New properties
This uses the new @file() syntax but behaves differently from normal configuration replacements. Because internal macros such as {schema}, {object}, {column}, and {parameter} are resolved dynamically within the auto-entity generation loop, these replacements cannot occur during configuration load. Instead, they must be evaluated after auto-generated entities have been expanded.
{
"template": {
"description": "@file('{schema}.{object}.MS_Description')", // table-level
"source": {
"parameters": {
"description": "@file('{schema}.{object}.@{parameter}.MS_Description')" // parameter-level
}
},
"fields": {
"description": "@file('{schema}.{object}.{column}.MS_Description')" // column-level
}
}
}In this case the metadata keys correspond to entries in the metadata files configured through metadata-files.
Example metadata file:
{
"dbo.Author.MS_Description": "Author records in the system",
"dbo.Author.Id.MS_Description": "Primary key of the author",
"dbo.GetCustomer.@CustomerId.MS_Description": "Identifier of the requested customer"
}During auto-entity generation, the template macros are expanded first and the resulting keys are resolved using @file() against the merged metadata dictionary.