You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR → examples-resolve (base: examples-migrate)
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.
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.
Add the transitional tsp-examples-legacy-expand tool that expands the unified examples into the concrete example for each operation at a target API version (greatest since <= target per lineage, using the service.yaml order) and materializes the {api-version} placeholder.
Add the transitional tsp-examples-migrate tool that converts existing x-ms-examples JSON into the unified examples.yaml format (crawls versioned Swagger, normalizes {api-version}, dedups across versions into since lineages, and uses an adjacent service.yaml as the authoritative version list).
1 package changed size, +732 B (+0.0%) packed overall.
Package
Packed (base → head)
Δ Packed
Unpacked (base → head)
Δ Unpacked
@azure-tools/typespec-azure-examples
58.15 KB → 58.94 KB
+809 B (+1.4%) 🔴
230.80 KB → 233.47 KB
+2.67 KB (+1.2%) 🔴
13 package(s) with no notable change
Package
Packed (base → head)
Δ Packed
Unpacked (base → head)
Δ Unpacked
@azure-tools/typespec-java
13.51 MB → 13.51 MB
-43 B (-0.0%)
15.03 MB → 15.03 MB
—
@azure-tools/typespec-azure-core
130.25 KB → 130.22 KB
-27 B (-0.0%)
706.89 KB → 706.76 KB
-135 B (-0.0%)
@azure-tools/azure-http-specs
146.71 KB → 146.71 KB
-4 B (-0.0%)
1.16 MB → 1.16 MB
—
@azure-tools/typespec-azure-portal-core
42.40 KB → 42.40 KB
-4 B (-0.0%)
192.91 KB → 192.91 KB
—
@azure-tools/typespec-ts
536.71 KB → 536.71 KB
+1 B (+0.0%)
2.58 MB → 2.58 MB
—
@azure-tools/typespec-autorest
80.93 KB → 80.93 KB
—
395.06 KB → 395.06 KB
—
@azure-tools/typespec-autorest-canonical
7.42 KB → 7.42 KB
—
26.00 KB → 26.00 KB
—
@azure-tools/typespec-azure-resource-manager
171.92 KB → 171.92 KB
—
1.04 MB → 1.04 MB
—
@azure-tools/typespec-azure-rulesets
5.16 KB → 5.16 KB
—
32.09 KB → 32.09 KB
—
@azure-tools/typespec-client-generator-core
229.48 KB → 229.48 KB
—
1.23 MB → 1.23 MB
—
@azure-tools/typespec-go
260.21 KB → 260.21 KB
—
1.33 MB → 1.33 MB
—
@azure-tools/typespec-metadata
15.91 KB → 15.91 KB
—
62.26 KB → 62.26 KB
—
@azure-tools/typespec-python
42.22 KB → 42.22 KB
—
164.91 KB → 164.91 KB
—
Packed = gzipped .tgz published to npm. Unpacked = total extracted size. 🆕 added, 🗑️ removed. Packages from the core/ submodule are not included. 🔴 grew · 🟢 shrank — only changes of at least 512 B and 0.5% are marked.
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
staleMark a PR that hasn't been recently updated and will be closed.
1 participant
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.
Part of the Unified Examples Format epic (#4831), tracking #4834.
Stack
examples.yamlschema +examples-validate(base)examples-migrateexamples-resolve(base:examples-migrate)What
Adds the
examples-resolvetool +examples-resolveCLI to@azure-tools/typespec-azure-examples, which resolves the applicable example for each operation at a target API version.since <= target(base entry applies from the earliest version), using the linearservice.yamlversion order.{api-version}placeholder to the target version.Tests added (vitest);
tsc,oxlint,prettierclean.