PowerShell wrapper Phase 1: cmdlet generation for the first 15 Graph modules - #7986
Open
Joywambui-maina wants to merge 2 commits into
Open
PowerShell wrapper Phase 1: cmdlet generation for the first 15 Graph modules#7986Joywambui-maina wants to merge 2 commits into
Joywambui-maina wants to merge 2 commits into
Conversation
Cmdlet nouns are built from the URL path, singularized word by word, with a small override table for the SDK's hand-tuned names. 66/66 name parity on the 15 pilot modules, 51 unit tests.
Code Coverage OverviewLanguages: C# C# / code-coverage/dotnetThe overall coverage in commit c439641 in the Show a code coverage summary of the most covered files.
Updated |
Author
|
@microsoft-github-policy-service agree [company="{microsoft}"] |
dotnet format --verify-no-changes was failing CI with CHARSET errors since these files were saved without the BOM required by .editorconfig (charset = utf-8-bom).
Joywambui-maina
force-pushed
the
joy/wrapper-generator
branch
from
July 25, 2026 03:48
958a13d to
c439641
Compare
Contributor
|
@Joywambui-maina please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
PowerShellWrapperas akiota generateoption (-l PowerShellWrapper), routed toits own generation service instead of the CodeDOM/refiner/writer pipeline, the same
shape as plugin generation.
operationId.
(
NamingOverrides.cs, 3 entries, each citing the AutoRest directive it mirrors), andskip operations the published SDK deliberately does not ship.
rule, in
src/Kiota.Builder/PowerShellWrapper/README.md, including known gaps.Why
Generated cmdlet names previously leaked raw plural path segments:
Get-MgUsersMessagesinstead of
Get-MgUserMessage,Get-MgSolutionsBookingBusinessesinstead ofGet-MgBookingBusiness. The nouns were taken from operationIds, which carry whateverplurality the spec author chose. The project requires generated cmdlets to keep the exact
names Microsoft.Graph customers already use.
Deriving the noun from the URL path makes naming deterministic (same OpenAPI input, same
cmdlet name) and gives naming and request routing one source of truth. The published
names are not fully algorithmic: a few come from hand-written AutoRest directives in the
SDK's module configs, so those cases live here as reviewable data with a cited source
each, and the generator itself stays generic.
Validation
51/51 tests passed. CI runs the same suite on this PR.
All 15 modules regenerated from their specs, then every generated cmdlet's HTTP method
and URL joined against
MgCommandMetadata.json(the inventory behindFind-MgGraphCommand): 66 of 66 cmdlets carry the exact published name, previously 30of 66.
Find-MgGraphCommandreturns the same command names this generator now emits.All 15 modules compiled, imported, and exercised against a live tenant: list reads,
item-by-id reads through the parameter-set dispatcher,
-Filterquery binding, writecmdlets, and errors surfacing as error records from the correct cmdlet.