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
Add `licenseInfo` property of `LicenseInfo` type to `SdkPackage`, which is used to indicate the license for the package and could be configured by `license.name`, `license.company`, `license.link`, `license.header` and `license.description` in `tspconfig.yaml`.
Copy file name to clipboardexpand all lines: packages/typespec-client-generator-core/README.md
+23-5
Original file line number
Diff line number
Diff line change
@@ -35,14 +35,24 @@ options:
35
35
36
36
## Emitter options
37
37
38
+
### `emitter-name`
39
+
40
+
**Type:** `string`
41
+
42
+
Set `emitter-name` to output TCGC code models for specific language's emitter. This flag only work for taking TCGC as an emitter.
43
+
38
44
### `generate-protocol-methods`
39
45
40
46
**Type:** `boolean`
41
47
48
+
When set to `true`, the emitter will generate low-level protocol methods for each service operation if `@protocolAPI` is not set for an operation. Default value is `true`.
49
+
42
50
### `generate-convenience-methods`
43
51
44
52
**Type:** `boolean`
45
53
54
+
When set to `true`, the emitter will generate low-level protocol methods for each service operation if `@convenientAPI` is not set for an operation. Default value is `true`.
55
+
46
56
### `package-name`
47
57
48
58
**Type:** `string`
@@ -51,21 +61,29 @@ options:
51
61
52
62
**Type:** `boolean`
53
63
54
-
### `api-version`
64
+
### `examples-dir`
55
65
56
66
**Type:** `string`
57
67
58
-
### `examples-dir`
68
+
Specifies the directory where the emitter will look for example files. If the flag isn’t set, the emitter defaults to using an `examples` directory located at the project root.
69
+
70
+
### `namespace`
59
71
60
72
**Type:** `string`
61
73
62
-
### `emitter-name`
74
+
Specifies the namespace you want to override for namespaces set in the spec. With this config, all namespace for the spec types will default to it.
75
+
76
+
### `api-version`
63
77
64
78
**Type:** `string`
65
79
66
-
### `namespace`
80
+
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`.
67
81
68
-
**Type:** `string`
82
+
### `license`
83
+
84
+
**Type:** `object`
85
+
86
+
License information for the generated client code.
Copy file name to clipboardexpand all lines: packages/typespec-client-generator-core/design-docs/flags.md
+24
Original file line number
Diff line number
Diff line change
@@ -19,3 +19,27 @@ Specifies the namespace you want to override for namespaces set in the spec. Wit
19
19
## 5. `api-version`
20
20
21
21
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`.
22
+
23
+
## 6. `license`
24
+
25
+
License information for the generated client code.
26
+
27
+
### `name`
28
+
29
+
License name. The config is required. Predefined license are: MIT License, Apache License 2.0, BSD 3-Clause License, MPL 2.0, GPL-3.0, LGPL-3.0. For other license, you need to configure all the other license config manually.
30
+
31
+
### `company`
32
+
33
+
License company name. It will be used in copyright sentences.
34
+
35
+
### `link`
36
+
37
+
License link.
38
+
39
+
### `header`
40
+
41
+
License header. It will be used in the header comment of generated client code.
"Set `emitter-name` to output TCGC code models for specific language's emitter. This flag only work for taking TCGC as an emitter.",
13
+
},
14
+
"generate-protocol-methods": {
15
+
type: "boolean",
16
+
nullable: true,
17
+
description:
18
+
"When set to `true`, the emitter will generate low-level protocol methods for each service operation if `@protocolAPI` is not set for an operation. Default value is `true`.",
19
+
},
20
+
"generate-convenience-methods": {
21
+
type: "boolean",
22
+
nullable: true,
23
+
description:
24
+
"When set to `true`, the emitter will generate low-level protocol methods for each service operation if `@convenientAPI` is not set for an operation. Default value is `true`.",
25
+
},
10
26
/**
11
27
* @deprecated Use the `package-name` option on your language emitter instead, if it exists.
12
28
*/
13
29
"package-name": {type: "string",nullable: true},
30
+
/**
31
+
* @deprecated Use `flattenUnionAsEnum` in `CreateSdkContextOptions` instead.
"Specifies the directory where the emitter will look for example files. If the flag isn’t set, the emitter defaults to using an `examples` directory located at the project root.",
39
+
},
40
+
namespace: {
41
+
type: "string",
42
+
nullable: true,
43
+
description:
44
+
"Specifies the namespace you want to override for namespaces set in the spec. With this config, all namespace for the spec types will default to it.",
45
+
},
46
+
"api-version": {
47
+
type: "string",
48
+
nullable: true,
49
+
description:
50
+
"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`.",
51
+
},
52
+
license: {
53
+
type: "object",
54
+
additionalProperties: false,
55
+
nullable: true,
56
+
required: ["name"],
57
+
properties: {
58
+
name: {
59
+
type: "string",
60
+
nullable: false,
61
+
description:
62
+
"License name. The config is required. Predefined license are: MIT License, Apache License 2.0, BSD 3-Clause License, MPL 2.0, GPL-3.0, LGPL-3.0. For other license, you need to configure all the other license config manually.",
63
+
},
64
+
company: {
65
+
type: "string",
66
+
nullable: true,
67
+
description: "License company name. It will be used in copyright sentences.",
68
+
},
69
+
link: {
70
+
type: "string",
71
+
nullable: true,
72
+
description: "License link.",
73
+
},
74
+
header: {
75
+
type: "string",
76
+
nullable: true,
77
+
description:
78
+
"License header. It will be used in the header comment of generated client code.",
79
+
},
80
+
description: {
81
+
type: "string",
82
+
nullable: true,
83
+
description: "License description. The full license text.",
84
+
},
85
+
},
86
+
description: "License information for the generated client code.",
0 commit comments