Skip to content

feat(examples): add examples-migrate tool - #5120

Draft
Timothee Guerin (timotheeguerin) wants to merge 1 commit into
examples-file-formatfrom
examples-migrate
Draft

feat(examples): add examples-migrate tool#5120
Timothee Guerin (timotheeguerin) wants to merge 1 commit into
examples-file-formatfrom
examples-migrate

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

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

Stack

Stacked PR — review/merge after the PR below it. Targets examples-file-format, not main.

What

Adds the examples-migrate tool + examples-migrate CLI to @azure-tools/typespec-azure-examples, which converts versioned Swagger x-ms-examples into the unified examples.yaml format.

  • Operation key derived by splitting operationId on the first _ and lowercasing the method segment (e.g. CaCertificates_GetCaCertificates.get).
  • De-duplicates example variants across API versions into since-anchored lineages.
  • Emits examples.yaml (bare integer status keys, quoted since, single-file or per-interface split).

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