Open SteveL-MSFT opened 2 weeks ago
Should the resources return the _metadata
object with the name annotation instead, to keep all metadata processing limited to that field?
e.g. instead of returning an instance like:
scope: machine
updateAutomatically: false
_exist: true
_name: TSToy Machine Configuration
The instance would return:
scope: machine
updateAutomatically: false
_exist: true
_metadata:
Microsoft.Dsc:
export:
_name: TSToy Machine Configuration
And DSC / other integrators would be able to handle it appropriately.
I've been thinking about the contract for metadata and I think having a single _metadata
object is probably a good idea, especially if we scope the DSC-engine-specific metadata to a top-level property - then people can comfortably add whatever other metadata to that object, as long as whatever they return in metadata."Microsoft.DSC"
matches our schemas.
Yeah, when I said "metadata", I literally meant metadata
:)
I think we only want that as a means for resources to return this type of info back to DSC rather than as a property.
Summary of the new feature / enhancement
Currently, when
dsc
callsexport
, for each returned instance, it generates thename
property as an incrementing value prefixed by the resource type. This means the end user needs to manually modify each instance if they want it a bit more descriptive.Proposed technical implementation details (optional)
Resources should be able to return a
_name
type metadata as part of export that would be used instead.