Skip to content

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

Draft
timotheeguerin wants to merge 1 commit into
examples-migratefrom
examples-resolve
Draft

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

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