feat(wrapper-generator): add deltaLink-aware pagination - #3744
Open
Joywambui-maina wants to merge 1 commit into
Open
feat(wrapper-generator): add deltaLink-aware pagination#3744Joywambui-maina wants to merge 1 commit into
Joywambui-maina wants to merge 1 commit into
Conversation
Joywambui-maina
requested review from
Peter Ombwa (peombwa) and
Ramses Sanchez-Hernandez (ramsessanchez)
and
a lite review from Copilot
August 25, 2026 19:24
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the WrapperGenerator to treat Microsoft Graph delta() operations as a first-class, deltaLink-aware paged shape, aligning generated cmdlets with expected delta semantics (page following under -All, terminal deltaLink publication, and a unified resume experience).
Changes:
- Adds delta operation detection/pairing in the generator and emits delta cmdlets via a dedicated delta template.
- Updates generated delta cmdlets to enumerate items to the pipeline, follow
@odata.nextLinkunder-All, and publish terminal@odata.deltaLinkvia-DeltaLinkVariable(aliasDLV), with a-DeltaLinkresume parameter set. - Adds tests and documentation describing delta-specific edge cases and the resulting contract.
Reviewed changes
Copilot reviewed 77 out of 77 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/WrapperGenerator/PowerShellWrapperGenerationService.cs | Detects and groups delta routes, then emits them via a dedicated delta shape. |
| tools/WrapperGenerator/docs/edge-cases/delta-edge-cases.md | Documents the delta cmdlet contract, pairing rules, and terminal-state handling. |
| tools/WrapperGenerator.Tests/EmitterTests.cs | Adds regression tests (“pins”) for delta resume, paging, variable publication, and terminal-state behavior. |
| src/Users/wrapper/v1.0/Cmdlets/GetMgUserTodoListDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Users.Functions/wrapper/v1.0/Cmdlets/GetMgUserDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Teams/wrapper/v1.0/Cmdlets/GetMgTeamPrimaryChannelMessageDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Teams/wrapper/v1.0/Cmdlets/GetMgGroupTeamPrimaryChannelMessageDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Teams/wrapper/v1.0/Cmdlets/GetMgChatMessageDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Sites/wrapper/v1.0/Cmdlets/GetMgSiteListItemDeltaWithToken.g.cs | Removes the token-form cmdlet in favor of folding resume into the canonical delta cmdlet. |
| src/Sites/wrapper/v1.0/Cmdlets/GetMgSiteDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Sites/wrapper/v1.0/Cmdlets/GetMgGroupSiteListItemDeltaWithToken.g.cs | Removes the token-form cmdlet in favor of folding resume into the canonical delta cmdlet. |
| src/Sites/wrapper/v1.0/Cmdlets/GetMgGroupSiteDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/PersonalContacts/wrapper/v1.0/Cmdlets/GetMgUserContactFolderDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/PersonalContacts/wrapper/v1.0/Cmdlets/GetMgUserContactDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Mail/wrapper/v1.0/Cmdlets/GetMgUserMessageDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Mail/wrapper/v1.0/Cmdlets/GetMgUserMailFolderDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Identity.SignIns/wrapper/v1.0/Cmdlets/GetMgOauth2PermissionGrantDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryRoleTemplateDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryRoleDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryAdministrativeUnitDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDeviceDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgContractDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgContactDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Groups/wrapper/v1.0/Cmdlets/GetMgGroupSettingTemplateDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Groups/wrapper/v1.0/Cmdlets/GetMgGroupDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgShareListItemDeltaWithToken.g.cs | Removes the token-form cmdlet in favor of folding resume into the canonical delta cmdlet. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgShareListItemDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgDriveListItemDeltaWithToken.g.cs | Removes the token-form cmdlet in favor of folding resume into the canonical delta cmdlet. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgDriveListItemDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgDriveItemDeltaWithToken.g.cs | Removes the token-form cmdlet in favor of folding resume into the canonical delta cmdlet. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgDriveItemDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationUserDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationUserAssignmentDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationSchoolDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationMeAssignmentDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationMeAssignmentCategoryDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationClassDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationClassAssignmentDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationClassAssignmentCategoryDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/DirectoryObjects/wrapper/v1.0/Cmdlets/GetMgDirectoryObjectDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/CloudCommunications/wrapper/v1.0/Cmdlets/GetMgCommunicationOnlineMeetingTranscriptDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/CloudCommunications/wrapper/v1.0/Cmdlets/GetMgCommunicationOnlineMeetingRecordingDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/CloudCommunications/wrapper/v1.0/Cmdlets/GetMgCommunicationAdhocCallTranscriptDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/CloudCommunications/wrapper/v1.0/Cmdlets/GetMgCommunicationAdhocCallRecordingDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgUserEventDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgGroupEventDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Applications/wrapper/v1.0/Cmdlets/GetMgServicePrincipalDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
| src/Applications/wrapper/v1.0/Cmdlets/GetMgApplicationDelta.g.cs | Generated delta cmdlet now supports resume, -All paging, and deltaLink publication; outputs enumerated items. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
16
to
19
| [GraphRoute("GET", "/users/delta()")] | ||
| [Cmdlet(VerbsCommon.Get, "MgUserDelta")] | ||
| [Cmdlet(VerbsCommon.Get, "MgUserDelta", DefaultParameterSetName = "DeltaSync")] | ||
| [OutputType(typeof(global::Microsoft.Graph.PowerShell.Users.Functions.Client.Users.Delta.DeltaGetResponse))] | ||
| public class GetMgUserDeltaCommand : GraphClientCmdlet |
Comment on lines
82
to
+91
| global::Microsoft.Graph.PowerShell.Users.Functions.Client.Users.Delta.DeltaGetResponse? result; | ||
| try | ||
| { | ||
| result = client.Users.Delta.GetAsDeltaGetResponseAsync(requestConfiguration => | ||
| result = ParameterSetName == "Resume" | ||
| ? client.Users.Delta.WithUrl(DeltaLink).GetAsDeltaGetResponseAsync(requestConfiguration => | ||
| { | ||
|
|
||
| AddRequestHeaders(requestConfiguration.Headers); | ||
| }).GetAwaiter().GetResult() | ||
| : client.Users.Delta.GetAsDeltaGetResponseAsync(requestConfiguration => |
…tion Output of the delta emitter change, with no hand edits: 67 delta commands gain -All, -DeltaLink and -DeltaLinkVariable, and the five delta(token=...) commands disappear, folded into their parameterless siblings as a resume parameter set. Proven against the sealed pre-change baseline: operation inventory 11,719 to 11,714 with exactly five removals and no additions, name parity matched unchanged at 9,548 with no-oracle down by the same five, body-binding oracle 0 failures, and the package gate PASS.
Joywambui-maina
force-pushed
the
feat/wrapper-pagination
branch
from
August 25, 2026 19:38
bc7f1e6 to
c8a833a
Compare
Joywambui-maina
force-pushed
the
feat/wrapper-delta
branch
from
August 25, 2026 19:38
69b51b4 to
37bed0d
Compare
Joywambui-maina
changed the base branch from
feat/wrapper-pagination
to
feat/wrapper-delta-generator
August 25, 2026 19:38
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:
-Give delta operations their own emit shape: items enumerate to the pipeline, -All follows @odata.nextLink through the change set, and the terminal @odata.deltaLink is published to -DeltaLinkVariable (alias DLV) — the same idiom the published SDK uses for -CountVariable
-Clear that variable at entry, so a run that fails or stops early cannot leave the previous run's link readable and silently resume from the wrong point
-Handle every terminal state explicitly: nextLink continues only under -All; deltaLink stops and publishes; neither stops and publishes nothing; both is refused rather than guessed at
-Merge the delta(token='…') form into its parameterless sibling as a Resume parameter set reached by -DeltaLink. The published SDK folds these into the canonical command rather than shipping them separately — no oracle row exists for any token form. -DeltaLink works on all 67 delta operations; a token argument exists on only 5
-Derive the pairing from route shape, never a list of names, and fail generation naming the route if a resume form is orphaned, ambiguous, or duplicated
-Record the contract and its evidence in tools/WrapperGenerator/docs/edge-cases/delta-edge-cases.md
-Fixes #3742