Skip to content

feat(examples): add examples-resolve tool - #5121

Draft
Timothee Guerin (timotheeguerin) wants to merge 1 commit into
examples-migratefrom
examples-resolve
Draft

feat(examples): add examples-resolve tool#5121
Timothee Guerin (timotheeguerin) wants to merge 1 commit into
examples-migratefrom
examples-resolve

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Part of the Unified Examples Format epic (#4831), tracking #4834.

Stack

Top of the stack — review/merge after the two PRs below it. Targets examples-migrate, not main.

What

Adds the examples-resolve tool + examples-resolve CLI to @azure-tools/typespec-azure-examples, which resolves the applicable example for each operation at a target API version.

  • Per lineage, selects the entry with the greatest since <= target (base entry applies from the earliest version), using the linear service.yaml version order.
  • Materializes the {api-version} placeholder to the target version.
  • Errors on an unknown target version; omits lineages with no applicable entry.

Tests added (vitest); tsc, oxlint, prettier clean.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the stale Mark a PR that hasn't been recently updated and will be closed. label Aug 14, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown

Hi @Timothee Guerin (@timotheeguerin). Your PR has had no update for 14 days and it is marked as a stale PR. If it is not updated within 14 days, the PR will automatically be closed. If you want to refresh the PR, please remove the stale label.

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

Labels

stale Mark a PR that hasn't been recently updated and will be closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant