Skip to content
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

Rectifies metadata path information for paths containing Microsoft.Graph prefix in nested segments. #2492

Conversation

timayabi2020
Copy link
Contributor

@timayabi2020 timayabi2020 commented Dec 14, 2023

Fixes #2453

Changes proposed in this pull request

  • The action function regex defined in the script (NewCommandMetadata.ps1) responsible for adding metadata information for commandlets does not handle scenarios where a path has Microsoft.Graph prefix in each path segment. For example, /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/microsoft.graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/microsoft.graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/ has two segments with 'microsoft.graph' prefix. The end result for this example is /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders where a whole segment has been truncated. This also affects snippet generation in devx API. The proposed change is to extract the segments and for each segment, remove 'microsoft.graph' prefix and the parenthesis on the last segment.

**Current snippet generation result **
image

Expected snippet generation result
image

@timayabi2020 timayabi2020 requested a review from a team as a code owner December 14, 2023 12:04
@timayabi2020 timayabi2020 linked an issue Dec 14, 2023 that may be closed by this pull request
Copy link
Member

@peombwa peombwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the recommended pesters tests.

Co-authored-by: Mustafa Zengin <mzengin88@gmail.com>
Co-authored-by: Peter Ombwa <peombwa@microsoft.com>
@timayabi2020 timayabi2020 merged commit 1ebab54 into dev Jan 8, 2024
2 checks passed
@timayabi2020 timayabi2020 deleted the 2453-missing-ms-learn-api-docs-examples-for-powershell-commands branch January 8, 2024 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing MS learn API docs examples for Powershell commands
3 participants