feat(openapi3): add @pageIndex decorator support for x-ms-list-page-index extension#9611
Merged
feat(openapi3): add @pageIndex decorator support for x-ms-list-page-index extension#9611
Conversation
…ension - Add support for x-ms-list-page-index OpenAPI extension - When x-ms-list-page-index is true, add @pageindex decorator to parameter - Add comprehensive tests for the feature - Tests verify decorator is added correctly and not added when false or missing 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 pageIndex decorator from OpenAPI extension
feat(openapi3): add @pageIndex decorator support for x-ms-list-page-index extension
Feb 6, 2026
baywet
approved these changes
Feb 6, 2026
commit: |
.chronus/changes/copilot-add-page-index-decorator-2026-1-6-17-27-56.md
Outdated
Show resolved
Hide resolved
timotheeguerin
approved these changes
Feb 6, 2026
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Contributor
|
All changed packages have been documented.
Show changes
|
timotheeguerin
approved these changes
Feb 6, 2026
Collaborator
|
You can try these changes here
|
6 tasks
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.
The OpenAPI3 importer now recognizes the
x-ms-list-page-indexextension on parameters and generates the corresponding@pageIndexdecorator in TypeSpec output.Changes
getParameterDecorators()to detectx-ms-list-page-index: trueand emit@pageIndexdecoratorExample
OpenAPI input:
Generated TypeSpec:
The extension decorator is preserved for round-trip fidelity while the semantic
@pageIndexdecorator enables proper paging behavior in downstream emitters.Original prompt
This section details on the original issue you should resolve
<issue_title>Add support for adding the pageIndex decorator based on the relevant openapi 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