Enable getting help in the terminal for DSC Resources #90
michaeltlombardi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now, at best, maintainers produce an about topic for the module their DSC Resources are in and topics for one or more resources. The DSC Community has had to build a lot of custom automation and bespoke practices around documenting DSC Resources but they're not necessarily discoverable if you don't know what you're looking for. Further, those documents are only available online, not in the terminal.
Despite the Category parameter of
Get-Help
supporting the valuesClass
andDscResource
(though notEnum
), there doesn't seem to be a way to author this help or retrieve it.Possible Implementations
There are three broad options for approaching this, in order from highest value/hardest implementation to lowest/easiest:
Get-Help -Category DscResource
return help for DSC ResourcesGet-DscResource
Get-DscHelp
function1. Update Get-Help
This option requires updating the PowerShell Help subsystem to recognize and handle DSC Resources. While it would be the most idiomatic, discoverable, and functional option, the intricacies of modifying the help system at this time may not support it.
2. Add help info to Get-DscResource
This option requires updating the
DscResourceInfo
type defined in thePSDesiredStateConfiguration
module. As this would be adding properties to that object, it should be backwards compatible. This would keep the most useful help information with the DSC Resource's in-memory representation and be useful for numerous scenarios, including vendor integrations. However, the presentation of the information in this implementation would need careful consideration and special handling to polish the DevX.3. Create new Get-DscHelp function
This option would require the development of a new function in the
PSDesiredStateConfiguration
module to handle retrieving the help information for a DSC Resource. This would be backwards compatible and retain full control over the presentation without introducing (too much) additional complexity. Combined with adding help info toGet-DscResource
, this function would provide as functional and delightful a DevX as I believe possible without modifying the PowerShell Help subsystem as described in option 1.Proposal
I propose that option one (update
Get-Help
to properly support DSC Resources) be implemented to ensure the best experience for module authors and users alike. Further, I propose that the same work be done for classes and enums (and, if #83 is implemented, interfaces).Beta Was this translation helpful? Give feedback.
All reactions