PowerShell / DSC

This repo is for the DSC v3 project
MIT License
133 stars 22 forks source link

Refactor arguments to command resources an mixed strings and objects for extensibility #385

Closed SteveL-MSFT closed 2 months ago

SteveL-MSFT commented 3 months ago

PR Summary

{
  "jsonInputArg": "<parameter>",
  "mandatory": true
}

The value of jsonInputArg is what the input gets passed to, so "jsonInputArg": "--foo" would be passed as command --foo $json effectively.

The mandatory indicates whether to pass the JSON even if empty. Default is false so it skips providing this parameter completely, but if true, it will always provide the parameter and an empty string if input is empty.

PR Context

Fix https://github.com/PowerShell/DSC/issues/218