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
-[917d2b1](https://github.com/Azure/typespec-azure/commit/917d2b12c66d0e46fa5894baaf2fed1a1950d517) Support a per-service `api-version` map for multi-service packages. The `api-version` emitter option now accepts either a string (applied to single service packages, or the `latest`/`all` keywords) or a map from each service namespace's full name to its desired version. Services not listed in the map default to their latest version.
Copy file name to clipboardExpand all lines: packages/typespec-client-generator-core/README.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,9 +62,14 @@ When set to `true`, the emitter will generate convenience methods for each servi
62
62
63
63
### `api-version`
64
64
65
-
**Type:** `string`
65
+
**Type:** `string | object`
66
+
67
+
Use this flag if you would like to generate the sdk only for a specific version. Default value is the latest version. Also accepts values `latest` and `all`. For multi-service packages, provide a map from each service namespace's full name to its desired version; services not listed default to their latest version.
68
+
69
+
**Options:**
66
70
67
-
Use this flag if you would like to generate the sdk only for a specific version. Default value is the latest version. Also accepts values `latest` and `all`.
Copy file name to clipboardExpand all lines: packages/typespec-client-generator-core/src/lib.ts
+20-6Lines changed: 20 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,25 @@ import {
5
5
UnbrandedSdkEmitterOptionsInterface,
6
6
}from"./internal-utils.js";
7
7
8
+
// `api-version` accepts either a string (single service / `latest` / `all`) or a
9
+
// map from service namespace full name to version (multi-service).
10
+
constapiVersionSchema={
11
+
oneOf: [
12
+
{
13
+
type: "string",
14
+
nullable: true,
15
+
},
16
+
{
17
+
type: "object",
18
+
additionalProperties: {type: "string"},
19
+
required: [],
20
+
nullable: true,
21
+
},
22
+
],
23
+
description:
24
+
"Use this flag if you would like to generate the sdk only for a specific version. Default value is the latest version. Also accepts values `latest` and `all`. For multi-service packages, provide a map from each service namespace's full name to its desired version; services not listed default to their latest version.",
"Use this flag if you would like to generate the sdk only for a specific version. Default value is the latest version. Also accepts values `latest` and `all`.",
0 commit comments