Conversation
- Add @prevLink, @nextlink, @firstlink, @lastlink decorators when corresponding x-ms-list-*-link extensions are true - Add comprehensive test suite for paging link extensions - Ensure @typespec/openapi import is added when using paging link decorators 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 importing prevLink decorator from OpenAPI extension
feat(openapi3): Add paging link decorator import from x-ms-list-*-link extensions
Feb 6, 2026
baywet
reviewed
Feb 6, 2026
.chronus/changes/copilot-add-import-support-prevlink-decorator-2026-1-6-17-55-25.md
Outdated
Show resolved
Hide resolved
This was
linked to
issues
Feb 6, 2026
Closed
Closed
Closed
baywet
approved these changes
Feb 6, 2026
timotheeguerin
approved these changes
Feb 6, 2026
commit: |
Contributor
|
All changed packages have been documented.
Show changes
|
This was referenced Feb 6, 2026
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.
The OpenAPI3 importer was not generating TypeSpec paging link decorators (
@prevLink,@nextLink,@firstLink,@lastLink) when encountering the correspondingx-ms-list-*-linkextensions.Changes
getPagingLinkDecorators()indecorators.tsto map x-ms-list-*-link extensions to their TypeSpec paging decoratorstrueExample
Given OpenAPI schema:
Now generates:
The importer emits both the
@extensiondecorator (preserving the original extension) and the semantic@prevLinkdecorator (enabling TypeSpec's paging analysis).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 sh s/.b�� e/petstore --war--llmstxt node _modules/pnpm/dist/node-gyp-bin/node import @typespecnode --production reams/reference sh nts/�� tsc -p tsconfig.build.json dotnet /node_modules/.bin/sh --no-emit Release ents/reference sh(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 importing the prevLink 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