Skip to content

Add ArmListBySubscriptionScope operation template for subscription-level listing#4185

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/fix-unexpected-path-listbysubscription
Draft

Add ArmListBySubscriptionScope operation template for subscription-level listing#4185
Copilot wants to merge 6 commits intomainfrom
copilot/fix-unexpected-path-listbysubscription

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

  • Add ArmListBySubscriptionScope operation template in operations.tsp
  • Add test in resource-resolution.test.ts verifying resolveArmResources for child resource subscription scope
  • Add test in typespec-autorest/test/arm/resources.test.ts verifying correct OpenAPI path output
  • Update user documentation in resource-operations.md
  • Rebuild reference documentation (regen-docs)
  • Apply review feedback: update JSDoc comments per suggestions
  • Apply review feedback: simplify docs table (remove separate children row)
  • Apply review feedback: change table to recommend ArmListBySubscriptionScope instead of ArmListBySubscription
  • Create changeset for the change
  • Pull latest from main — no merge conflicts, only PR changes in diff
  • All 47 resource-resolution tests pass, all 16 autorest ARM tests pass
  • All files correctly formatted

Copilot AI linked an issue Apr 2, 2026 that may be closed by this pull request
…subscription-level listing

Adds a new operation template that generates the correct subscription-level
list path for child resources, omitting parent resource path segments.

For example, for an Employee child resource under a Test parent, this generates:
/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/employees

Includes tests in resource-resolution and typespec-autorest, updated how-to
documentation, and regenerated reference docs.

Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/ed038532-137a-45fa-8f23-27bce702d52a

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library emitter:autorest Issues for @azure-tools/typespec-autorest emitter meta:website TypeSpec.io updates labels Apr 2, 2026
Copilot AI changed the title [WIP] Fix unexpected path for listBySubscription Add ArmListBySubscriptionScope operation template for child resource subscription-level listing Apr 2, 2026
Copilot AI requested a review from markcowl April 2, 2026 21:16
Copy link
Copy Markdown
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

Pull the latest from main. Create a changeset for this change. Make the suggested changes.

Then verify that all tests pass, all files are correctly formatted and there are no merge issues with main

copilot and others added 2 commits April 2, 2026 22:01
…d-path-listbysubscription

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
…geset, merge main

Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/0677a3f4-5b39-442d-836d-1ecc4083feda

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 2, 2026

Pull the latest from main. Create a changeset for this change. Make the suggested changes.

Then verify that all tests pass, all files are correctly formatted and there are no merge issues with main

Done in 2ec3635 — merged latest from main (no conflicts), applied all suggested changes, created changeset, regenerated docs, verified formatting and all tests pass (47 resource-resolution + 16 autorest ARM tests).

Copilot AI changed the title Add ArmListBySubscriptionScope operation template for child resource subscription-level listing Add ArmListBySubscriptionScope operation template for subscription-level listing Apr 2, 2026
Copilot AI requested a review from markcowl April 2, 2026 22:19
Copy link
Copy Markdown
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

@copilot make the suggested changes, ensure all tests pass and all files are correctly formatted. pull the latest from main and ensure that only your changes are in the pr

@@ -188,6 +188,10 @@ Arm Resource list operations return a list of Tracked or Proxy Resources at a pa
| ListBySubscription | `listBySubscription is ArmListBySubscription<ResourceType>` |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This line should use ArmListBySubscriptionScope

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There should be no line in this table that uses ArmListBySubscription

…d-path-listbysubscription

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Copilot AI requested a review from markcowl April 3, 2026 22:04
Copy link
Copy Markdown
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

@copilot

Please fix this issue, ensure all files are formatted correctly, pull the latest from main and ensure that only your changes are in the PR and there are no merge issues

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 3, 2026

@copilot

Please fix this issue, ensure all files are formatted correctly, pull the latest from main and ensure that only your changes are in the PR and there are no merge issues

Fixed in 6ee7d9b — updated the table row to use ArmListBySubscriptionScope, formatted all files, confirmed no merge issues with main, and verified only PR changes are in the diff (47 resource-resolution + 16 autorest ARM tests pass).

Copilot AI requested a review from markcowl April 3, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:autorest Issues for @azure-tools/typespec-autorest emitter lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected path for listBySubscription

2 participants