Skip to content

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

Draft
timotheeguerin wants to merge 1 commit into
examples-file-formatfrom
examples-migrate
Draft

feat(examples): add examples-migrate tool#5120
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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant