From 67e8ce1cc74c2e827e4708a00ec389f2683b5866 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:38:49 +0000 Subject: [PATCH 1/4] Initial plan From 300e2d98c42822991022bd1b763cdd0c34bd4e3b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:44:43 +0000 Subject: [PATCH 2/4] docs: add clientside-pagination directive guidance Co-authored-by: isra-fel <11371776+isra-fel@users.noreply.github.com> --- docs/directives.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/directives.md b/docs/directives.md index c4d49693de..9d555b8906 100644 --- a/docs/directives.md +++ b/docs/directives.md @@ -91,6 +91,7 @@ The following directives cover the most common tweaking scenarios for cmdlet gen - [Cmdlet Aliasing](#Cmdlet-Aliasing) - [Cmdlet Suppression (Removal and Hiding)](#Cmdlet-Suppression) - [Suppress ShouldProcess (-WhatIf / -Confirm)](#Suppress-ShouldProcess) +- [Client-Side Pagination](#Client-Side-Pagination) - [Parameter Rename](#Parameter-Rename) - [Parameter Aliasing](#Parameter-Aliasing) - [Parameter Hiding](#Parameter-Hiding) @@ -247,6 +248,39 @@ Notes: - Has no effect if the cmdlet does not already support ShouldProcess. - Use sparingly; only when you are certain the underlying operation is non-mutating. +### Client-Side Pagination +AutoRest normally exposes server-side pagination parameters directly to users. For list-style cmdlets, you can enable client-side pagination to automatically fetch all pages and return a complete result set in a single call. + +With client-side pagination enabled, the generated cmdlet will: +- Hide pagination parameters like `Skip` and `Top`. +- Iterate through the service's pagination responses automatically. +- Return the complete collection to the user. + +```yaml $false +# Enable automatic pagination for a list operation +directive: + - where: + verb: Get + subject: Item + set: + clientside-pagination: true +``` + +Regex example: +```yaml $false +# Enable client-side pagination for all Get-*List cmdlets +directive: + - where: + verb: Get + subject: (.*)List$ + set: + clientside-pagination: true +``` + +Notes: +- Only applies to `command` targets. +- Use when pagination is an implementation detail rather than a meaningful filter. + ### Parameter Rename To select a parameter you need to provide the `parameter-name`. Furthermore, if you want to target specific cmdlets you can provide the `subject-prefix`, `subject`, `verb`, and/or `variant` (i.e. parameter-set). For example: ```yaml false From 908dbe30d48ca560f04d3f40442f63bc665fc7f8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:45:14 +0000 Subject: [PATCH 3/4] docs: clarify clientside-pagination guidance Co-authored-by: isra-fel <11371776+isra-fel@users.noreply.github.com> --- docs/directives.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/directives.md b/docs/directives.md index 9d555b8906..3cc0b7311e 100644 --- a/docs/directives.md +++ b/docs/directives.md @@ -279,7 +279,8 @@ directive: Notes: - Only applies to `command` targets. -- Use when pagination is an implementation detail rather than a meaningful filter. +- This hides pagination parameters from the cmdlet; leave this directive off if users need manual paging control. +- Use for small to medium result sets where fetching everything is practical; avoid for large datasets where automatic paging could be costly. ### Parameter Rename To select a parameter you need to provide the `parameter-name`. Furthermore, if you want to target specific cmdlets you can provide the `subject-prefix`, `subject`, `verb`, and/or `variant` (i.e. parameter-set). For example: From 8b3478feda0f50c2bf7480cee5f9ed60c36058f4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:45:30 +0000 Subject: [PATCH 4/4] docs: use pagination wording Co-authored-by: isra-fel <11371776+isra-fel@users.noreply.github.com> --- docs/directives.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/directives.md b/docs/directives.md index 3cc0b7311e..53eab4958f 100644 --- a/docs/directives.md +++ b/docs/directives.md @@ -280,7 +280,7 @@ directive: Notes: - Only applies to `command` targets. - This hides pagination parameters from the cmdlet; leave this directive off if users need manual paging control. -- Use for small to medium result sets where fetching everything is practical; avoid for large datasets where automatic paging could be costly. +- Use for small to medium result sets where fetching everything is practical; avoid for large datasets where automatic pagination could be costly. ### Parameter Rename To select a parameter you need to provide the `parameter-name`. Furthermore, if you want to target specific cmdlets you can provide the `subject-prefix`, `subject`, `verb`, and/or `variant` (i.e. parameter-set). For example: