-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New-DscResourcePowerShellHelp: Add functionality to generate contextual help from class-based, DSC resources #51
Comments
@SphenicPaul I could make this a weekend project. I get to learn some AST around classes. |
@SphenicPaul Working on this, but got a design question. For MOF-resources there is a For class-based resource where should we put these Example of how the README.md is generated:
|
@SphenicPaul Maybe we shouldn't use a markdown file at all. Should we just use the comment-based that is part of the class help for this? For now I work on that assumption that we just use the comment-based help. |
I think using the comment-based help makes sense - It removes the requirement for an extra file and there isn't the additional subfolder within the |
I have this working now. Sending in PR shortly. There is no native support for comment-based help for PowerShell classes through AST (only for functions and scriptblocks). So I have to cheat and load the source file as script file (which become a script block - single resource in single file = single script block ) and then use the AST's method If there is native support for comment-based help for classes in future we have to revisit this. |
@SphenicPaul if you wouldn't mind I would love a review on PR #53 if you have time. 🙂 |
- Support conceptual help for class-based resources (issue #51).
Details of the scenario you tried and the problem that is occurring
The
New-DscResourcePowerShellHelp
function (andGenerate_Conceptual_Help
task) contextual help doesn't currently seem to parse class-based, DSC resources.Steps to reproduce the problem
Build a
DscCommunity
build with class based resources (e.g. AzureDevOpsDsc).Expected behavior
Should identify class-based, DSC resources and generate contextual help.
Current behavior
Generates nothing. Currently only generating for MOF-based resources.
Suggested solution to the issue
Implement functionality in
New-DscResourcePowerShellHelp
function to identify and generate help from class-based DSC resources.Possibly use
[DscResource()]
, class attribute and/orClasses
, subdirectory to identify. Possibly add other class attributes to detail descriptions/information to be used as part of the contextual help?The operating system the target node is running
n/a
Version and build of PowerShell the target node is running
PSVersion 5.1.19041.610
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.610
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the module that was used
v0.7.2
The text was updated successfully, but these errors were encountered: