feat(openapi3): Add @list decorator when x-ms-list extension is true#9609
Merged
feat(openapi3): Add @list decorator when x-ms-list extension is true#9609
Conversation
Add @list decorator to operations when x-ms-list: true is detected in OpenAPI specs. The implementation also preserves the extension decorator for roundtrip compatibility. Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for list decorator in operations
feat(openapi3): Add @list decorator when x-ms-list extension is true
Feb 6, 2026
baywet
reviewed
Feb 6, 2026
.chronus/changes/copilot-add-list-decorator-support-2026-1-6-17-18-23.md
Outdated
Show resolved
Hide resolved
baywet
approved these changes
Feb 6, 2026
commit: |
timotheeguerin
approved these changes
Feb 6, 2026
Contributor
|
All changed packages have been documented.
Show changes
|
Collaborator
|
You can try these changes here
|
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.
OpenAPI specs using
x-ms-list: trueto mark list operations weren't generating the corresponding@listdecorator in TypeSpec output.Changes
getExtensions()indecorators.tsto detectx-ms-list: trueand emit both@listand@extension("x-ms-list", true)decoratorsExample
Input OpenAPI:
Generated TypeSpec (before):
Generated TypeSpec (after):
The
@listdecorator marks the operation as paginated, while the@extensionpreserves roundtrip compatibility.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
telemetry.astro.build/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/astro.js build node eams�� ebsite/src/content/docs/docs/libraries/openapi/reference node(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Add support for adding list decorator to operations when detecting the corresponding extension</issue_title>
<issue_description>### Clear and concise description of the problem
Related https://github.com/microsoft/openai-openapi-pr/issues/568
Based on the following OpenAPI description, we should get the following TypeSpec definition imported