You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request]: Code optimization - retrieve module relative path through dedicated function #3187
Alexander Sehr (@AlexanderSehr) so I get the function should return the module full resourceType and not only the relative path, correct? If so I guess we should go with something like Get-ModuleResourceType?
Alexander Sehr (@AlexanderSehr) so I get the function should return the module full resourceType and not only the relative path, correct? If so I guess we should go with something like Get-ModuleResourceType?
Correct. So network/virtual-networks should return Microsoft.Network/virtualNetworks.
Ref updated Set-DeploymentExamplesSection in Set-ModuleReadme for cleaner code to convert from kebab-case to camelCase or PascalCase:
# Convert moduleName from kebab-case to camelCase$First,$Rest=$moduleName-Split'-',2$moduleNameCamelCase=$First.Tolower() + (Get-Culture).TextInfo.ToTitleCase($Rest) -Replace'-'# Convert moduleName from kebab-case to PascalCase$moduleNamePascalCase= (Get-Culture).TextInfo.ToTitleCase($moduleName) -Replace'-'
Activity
AlexanderSehr commentedon May 9, 2023
Should link to
eriqua commentedon May 9, 2023
Alexander Sehr (@AlexanderSehr) so I get the function should return the module full resourceType and not only the relative path, correct? If so I guess we should go with something like
Get-ModuleResourceType?eriqua commentedon May 11, 2023
Should also include an update to custom modules to include their suffix in the readme title
AlexanderSehr commentedon May 13, 2023
Correct. So
network/virtual-networksshould returnMicrosoft.Network/virtualNetworks.eriqua commentedon May 20, 2023
Ref updated Set-DeploymentExamplesSection in Set-ModuleReadme for cleaner code to convert from kebab-case to camelCase or PascalCase: