Skip to content

Update dsc resource list output schema to include methods #332

@michaeltlombardi

Description

@michaeltlombardi

Summary of the new feature / enhancement

With the implementation of #309 in #314, users can now see which methods a resource supports when they run dsc resource list with the default view. However, if they capture the output or use an alternate format, this information is lost as it isn't part of the actual output object.

As a user and integrating engineer, I want to be able to quickly check which methods a resource supports in a script or function, so that I can make decisions about how to process that resource further.

Proposed technical implementation details (optional)

  1. Add the methods field to the DscResource struct in dsc_lib/src/dscresource.rs as either a vector of strings or enumerations that map to the valid methods.
  2. Move the logic for defining the methods field surfaced in the table from the List subcommand in dsc/src/subcommand.rs to the load_manifest function in dsc_lib/src/discovery/command_discovery.rs.
  3. Update the source schema for the output object in schemas/src/outputs/resource/list.yaml to include the methods property.
  4. Regenerate the compiled schemas from updated source. This change does not require an update to the canonical schema URI, as it's backward compatible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions