Skip to content

Consolidate collection and paging checks in list-response-envelope - #6044

Draft
Mary Gao (MaryGao) wants to merge 5 commits into
mainfrom
refactor/paging-collection-api-5940
Draft

Mary Gao (MaryGao) wants to merge 5 commits into
mainfrom
refactor/paging-collection-api-5940

Conversation

@MaryGao

@MaryGao Mary Gao (MaryGao) commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Consolidates the ARM collection-response and paging checks in the list-response-envelope TypeSpec linter rule.

The rule reports operation-level paging and response-model envelope findings independently. It checks collection GET operations for @list, HTTP 200 response models for exactly value and nextLink, and pageable response values and TypeSpec paging metadata. The list-operation-missing-pageable rule ID is retired; no-query-in-collection is not part of this PR.

Swagger validators covered:

Five-project comparison

Project Swagger findings TypeSpec warnings
Advisor 2 2
Compute 22 22
Key Vault 4 4
Network 32 distinct rule paths (340 raw) 32
Storage 8 8

Network's raw Swagger findings repeat across 19 emitted files. TypeSpec was assessed in target-only mode with HTTP-reachable alignment; project-default activation was not assessed. No project had a higher TypeSpec count in this comparison. Equal counts do not prove finding-by-finding or predicate equivalence. CollectionObjectPropertiesNaming had no observations in these projects.

Related issues

  • Tracking: #5940
  • Collection-scope design discussion: #5970

Migration report

Rule migration report

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added int:azure-specs Run integration tests against azure-rest-api-specs eng lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library meta:website TypeSpec.io updates linter Issues related to linter rules labels Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @azure-tools/typespec-azure-resource-manager
  • ✅ @azure-tools/typespec-azure-rulesets
Show changes

@azure-tools/typespec-azure-resource-manager - fix ✏️

Merge list-operation-missing-pageable into list-response-envelope, checking collection paging metadata and response envelopes together. Replace configurations and suppressions for the retired rule ID with list-response-envelope; the combined rule remains disabled in the resource-manager preset.

@azure-tools/typespec-azure-rulesets - fix ✏️

Merge list-operation-missing-pageable into list-response-envelope, checking collection paging metadata and response envelopes together. Replace configurations and suppressions for the retired rule ID with list-response-envelope; the combined rule remains disabled in the resource-manager preset.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📦 Package size report

5 packages changed size, +18.91 KB (+0.1%) packed overall.

Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/typespec-go 290.28 KB → 303.39 KB +13.10 KB (+4.5%) 🔴 1.48 MB → 1.55 MB +73.39 KB (+4.8%) 🔴
@azure-tools/typespec-azure-core 141.62 KB → 144.66 KB +3.04 KB (+2.1%) 🔴 757.42 KB → 771.39 KB +13.97 KB (+1.8%) 🔴
@azure-tools/azure-http-specs 152.98 KB → 155.02 KB +2.04 KB (+1.3%) 🔴 1.26 MB → 1.27 MB +7.76 KB (+0.6%) 🔴
@azure-tools/typespec-azure-resource-manager 209.83 KB → 211.13 KB +1.30 KB (+0.6%) 🔴 1.25 MB → 1.26 MB +4.03 KB (+0.3%)
@azure-tools/typespec-client-generator-core 265.18 KB → 264.53 KB -664 B (-0.2%) 1.40 MB → 1.40 MB -7.75 KB (-0.5%) 🟢
9 package(s) with no notable change
Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/typespec-ts 551.17 KB → 551.24 KB +77 B (+0.0%) 2.75 MB → 2.76 MB +376 B (+0.0%)
@azure-tools/typespec-azure-examples 97.00 KB → 96.99 KB -14 B (-0.0%) 487.04 KB → 487.04 KB —
@azure-tools/typespec-azure-rulesets 6.19 KB → 6.20 KB +10 B (+0.2%) 38.09 KB → 38.26 KB +183 B (+0.5%)
@azure-tools/typespec-azure-portal-core 36.32 KB → 36.33 KB +5 B (+0.0%) 243.05 KB → 243.09 KB +43 B (+0.0%)
@azure-tools/typespec-autorest 88.64 KB → 88.65 KB +1 B (+0.0%) 427.94 KB → 427.94 KB —
@azure-tools/typespec-autorest-canonical 7.42 KB → 7.42 KB — 26.00 KB → 26.00 KB —
@azure-tools/typespec-java 20.23 MB → 20.23 MB — 22.53 MB → 22.53 MB —
@azure-tools/typespec-metadata 15.88 KB → 15.88 KB — 62.08 KB → 62.08 KB —
@azure-tools/typespec-python 42.66 KB → 42.66 KB — 166.15 KB → 166.15 KB —

Packed = gzipped .tgz published to npm. Unpacked = total extracted size. 🆕 added, 🗑️ removed. Packages from the core/ submodule are not included.
🔴 grew · 🟢 shrank — only changes of at least 512 B and 0.5% are marked.

@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@azure-tools/typespec-azure-resource-manager@6044
npm i https://pkg.pr.new/@azure-tools/typespec-azure-rulesets@6044

commit: db524dc

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

@MaryGao
Mary Gao (MaryGao) marked this pull request as draft November 10, 2026 11:00
Mary Gao and others added 3 commits November 10, 2026 20:58
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MaryGao Mary Gao (MaryGao) changed the title Imple list-response-envelope rule Consolidate collection and paging checks in list-response-envelope Nov 11, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eng int:azure-specs Run integration tests against azure-rest-api-specs lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library linter Issues related to linter rules meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant