@azure-tools/typespec-python 0.22.5 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -1
- package/dist/src/code-model.d.ts +4 -0
- package/dist/src/code-model.d.ts.map +1 -0
- package/dist/src/code-model.js +205 -0
- package/dist/src/code-model.js.map +1 -0
- package/dist/src/emitter.d.ts.map +1 -1
- package/dist/src/emitter.js +14 -753
- package/dist/src/emitter.js.map +1 -1
- package/dist/src/http.d.ts +7 -0
- package/dist/src/http.d.ts.map +1 -0
- package/dist/src/http.js +255 -0
- package/dist/src/http.js.map +1 -0
- package/dist/src/lib.d.ts +5 -0
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js.map +1 -1
- package/dist/src/types.d.ts +4 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +43 -51
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils.d.ts +24 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +88 -0
- package/dist/src/utils.js.map +1 -1
- package/package.json +22 -22
package/README.md
CHANGED
|
@@ -1 +1,118 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TypeSpec Python Client Emitter
|
|
2
|
+
|
|
3
|
+
## Getting started
|
|
4
|
+
|
|
5
|
+
### Initialize TypeSpec Project
|
|
6
|
+
|
|
7
|
+
Follow [TypeSpec Getting Started](https://typespec.io/docs) to initialize your TypeSpec project.
|
|
8
|
+
|
|
9
|
+
Make sure `npx tsp compile .` runs correctly.
|
|
10
|
+
|
|
11
|
+
### Add typespec-python to your project
|
|
12
|
+
|
|
13
|
+
Include @azure-tools/typespec-python dependencies in `package.json`:
|
|
14
|
+
|
|
15
|
+
```diff
|
|
16
|
+
"dependencies": {
|
|
17
|
+
+ "@azure-tools/typespec-python": "latest"
|
|
18
|
+
},
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Run `npm install` to install the dependency.
|
|
22
|
+
|
|
23
|
+
### Generate a Python client library
|
|
24
|
+
|
|
25
|
+
You can either specify typespec-python on the commandline or through tspconfig.yaml.
|
|
26
|
+
|
|
27
|
+
#### Generate with `--emit` command
|
|
28
|
+
|
|
29
|
+
Run command `npx tsp compile --emit @azure-tools/typespec-python <path-to-typespec-file>`
|
|
30
|
+
|
|
31
|
+
e.g.
|
|
32
|
+
|
|
33
|
+
```cmd
|
|
34
|
+
npx tsp compile main.tsp --emit @azure-tools/typespec-python
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
or
|
|
38
|
+
|
|
39
|
+
```cmd
|
|
40
|
+
npx tsp compile client.tsp --emit @azure-tools/typespec-python
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### Generate with tspconfig.yaml
|
|
44
|
+
|
|
45
|
+
Add the following configuration in tspconfig.yaml:
|
|
46
|
+
|
|
47
|
+
```diff
|
|
48
|
+
emit:
|
|
49
|
+
- "@azure-tools/typespec-python"
|
|
50
|
+
options:
|
|
51
|
+
"@azure-tools/typespec-python":
|
|
52
|
+
+ package-dir: "azure-contoso"
|
|
53
|
+
+ package-name: "azure-contoso"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Run the command to generate your library:
|
|
57
|
+
|
|
58
|
+
```cmd
|
|
59
|
+
npx tsp compile main.tsp
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
or
|
|
63
|
+
|
|
64
|
+
```cmd
|
|
65
|
+
npx tsp compile client.tsp
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Configure the generated library
|
|
69
|
+
|
|
70
|
+
You can further configure the generated client library using the emitter options provided through @azure-tools/typespec-python.
|
|
71
|
+
|
|
72
|
+
You can set options in the command line directly via `--option @azure-tools/typespec-python.<optionName>=XXX`, e.g. `--option @azure-tools/typespec-python.package-name="azure-contoso"`
|
|
73
|
+
|
|
74
|
+
or
|
|
75
|
+
|
|
76
|
+
Modify `tspconfig.yaml` in the TypeSpec project to add emitter options under options/@azure-tools/typespec-python.
|
|
77
|
+
|
|
78
|
+
```diff
|
|
79
|
+
emit:
|
|
80
|
+
- "@azure-tools/typespec-python"
|
|
81
|
+
options:
|
|
82
|
+
"@azure-tools/typespec-python":
|
|
83
|
+
+ package-dir: "{package-dir}"
|
|
84
|
+
+ package-name: "azure-contoso"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Supported emitter options
|
|
88
|
+
|
|
89
|
+
Common emitter configuration example:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
emit:
|
|
93
|
+
- "@azure-tools/typespec-python"
|
|
94
|
+
options:
|
|
95
|
+
"@azure-tools/typespec-python":
|
|
96
|
+
package-dir: "{package-dir}"
|
|
97
|
+
package-name: "azure-contoso"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
|Option|Type|Description|
|
|
101
|
+
|-|-|-|
|
|
102
|
+
|`package-version`|string|Specify the package version. Default version: `1.0.0b1`.|
|
|
103
|
+
|`package-name`|string|Specify the package name.|
|
|
104
|
+
|`package-dir`|string|Specify the output directory for the package.|
|
|
105
|
+
|`generate-packaging-files`|boolean|Indicate if packaging files, such as setup.py, should be generated.|
|
|
106
|
+
|`package-pprint-name`|string|Specify the pretty print name for the package.|
|
|
107
|
+
|`flavor`|string|Represents the type of SDK that will be generated. By default, there will be no branding in the generated client library. Specify `"azure"` to generate an SDK following Azure guidelines.|
|
|
108
|
+
|`company-name`|string|Specify the company name to be inserted into licensing data. For `"azure"` flavor, the default value inserted is `Microsoft`.|
|
|
109
|
+
|
|
110
|
+
**Advanced emitter options**
|
|
111
|
+
|
|
112
|
+
|Option|Type|Description|
|
|
113
|
+
|-|-|-|
|
|
114
|
+
|`head-as-boolean`|boolean|Generate head calls to return a boolean. Default: `true`.|
|
|
115
|
+
|`packaging-files-dir`|string|Pass in the path to a custom directory with SDK packaging files.|
|
|
116
|
+
|`packaging-files-config`|object|Specify configuration options that will be passed directly into the packaging files specified by the `packaging-files-dir` option.|
|
|
117
|
+
|`tracing`|boolean|Only available for the `"azure"` flavor of SDKs, provide tracing support in the generated client library. Default: `true`.|
|
|
118
|
+
|`debug`|boolean|Enable debugging.|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SdkServiceOperation } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
import { PythonSdkContext } from "./lib.js";
|
|
3
|
+
export declare function emitCodeModel<TServiceOperation extends SdkServiceOperation>(sdkContext: PythonSdkContext<TServiceOperation>): Record<string, any>;
|
|
4
|
+
//# sourceMappingURL=code-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-model.d.ts","sourceRoot":"","sources":["../../src/code-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAUH,mBAAmB,EAGtB,MAAM,6CAA6C,CAAC;AAIrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAqN5C,wBAAgB,aAAa,CAAC,iBAAiB,SAAS,mBAAmB,EACvE,UAAU,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,uBAkClD"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { UsageFlags, getCrossLanguagePackageId, } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
import { KnownTypes, getType, simpleTypesMap, typesMap } from "./types.js";
|
|
3
|
+
import { emitParamBase, getImplementation, removeUnderscoresFromNamespace } from "./utils.js";
|
|
4
|
+
import { emitBasicHttpMethod, emitLroHttpMethod, emitLroPagingHttpMethod, emitPagingHttpMethod } from "./http.js";
|
|
5
|
+
import { ignoreDiagnostics } from "@typespec/compiler";
|
|
6
|
+
function emitBasicMethod(context, rootClient, method, operationGroupName) {
|
|
7
|
+
if (method.operation.kind !== "http")
|
|
8
|
+
throw new Error("We only support HTTP operations right now");
|
|
9
|
+
switch (method.operation.kind) {
|
|
10
|
+
case "http":
|
|
11
|
+
return emitBasicHttpMethod(context, rootClient, method, operationGroupName);
|
|
12
|
+
default:
|
|
13
|
+
throw new Error("We only support HTTP operations right now");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function emitLroMethod(context, rootClient, method, operationGroupName) {
|
|
17
|
+
if (method.operation.kind !== "http")
|
|
18
|
+
throw new Error("We only support HTTP operations right now");
|
|
19
|
+
switch (method.operation.kind) {
|
|
20
|
+
case "http":
|
|
21
|
+
return emitLroHttpMethod(context, rootClient, method, operationGroupName);
|
|
22
|
+
default:
|
|
23
|
+
throw new Error("We only support HTTP operations right now");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function emitPagingMethod(context, rootClient, method, operationGroupName) {
|
|
27
|
+
if (method.operation.kind !== "http")
|
|
28
|
+
throw new Error("We only support HTTP operations right now");
|
|
29
|
+
switch (method.operation.kind) {
|
|
30
|
+
case "http":
|
|
31
|
+
return emitPagingHttpMethod(context, rootClient, method, operationGroupName);
|
|
32
|
+
default:
|
|
33
|
+
throw new Error("We only support HTTP operations right now");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function emitLroPagingMethod(context, rootClient, method, operationGroupName) {
|
|
37
|
+
if (method.operation.kind !== "http")
|
|
38
|
+
throw new Error("We only support HTTP operations right now");
|
|
39
|
+
switch (method.operation.kind) {
|
|
40
|
+
case "http":
|
|
41
|
+
return emitLroPagingHttpMethod(context, rootClient, method, operationGroupName);
|
|
42
|
+
default:
|
|
43
|
+
throw new Error("We only support HTTP operations right now");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function emitMethodParameter(context, client, parameter) {
|
|
47
|
+
if (parameter.kind === "endpoint") {
|
|
48
|
+
if (parameter.type.serverUrl && parameter.type.templateArguments.length > 0) {
|
|
49
|
+
const params = [];
|
|
50
|
+
for (const param of parameter.type.templateArguments) {
|
|
51
|
+
params.push({
|
|
52
|
+
...emitParamBase(context, param),
|
|
53
|
+
wireName: param.name,
|
|
54
|
+
location: "endpointPath",
|
|
55
|
+
implementation: getImplementation(context, param),
|
|
56
|
+
clientDefaultValue: param.clientDefaultValue,
|
|
57
|
+
skipUrlEncoding: param.urlEncode === false,
|
|
58
|
+
});
|
|
59
|
+
context.__endpointPathParameters.push(params.at(-1));
|
|
60
|
+
}
|
|
61
|
+
return params;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return [
|
|
65
|
+
{
|
|
66
|
+
optional: parameter.optional,
|
|
67
|
+
description: parameter.description || "",
|
|
68
|
+
clientName: context.arm ? "base_url" : "endpoint",
|
|
69
|
+
clientDefaultValue: parameter.type.serverUrl,
|
|
70
|
+
wireName: "$host",
|
|
71
|
+
location: "path",
|
|
72
|
+
type: KnownTypes.string,
|
|
73
|
+
implementation: getImplementation(context, parameter),
|
|
74
|
+
inOverload: false,
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const base = {
|
|
80
|
+
...emitParamBase(context, parameter),
|
|
81
|
+
implementation: getImplementation(context, parameter),
|
|
82
|
+
clientDefaultValue: parameter.clientDefaultValue,
|
|
83
|
+
location: parameter.kind,
|
|
84
|
+
};
|
|
85
|
+
if (parameter.isApiVersionParam) {
|
|
86
|
+
return [
|
|
87
|
+
{
|
|
88
|
+
...base,
|
|
89
|
+
location: "query",
|
|
90
|
+
wireName: "api-version",
|
|
91
|
+
in_docstring: false,
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
return [base];
|
|
96
|
+
}
|
|
97
|
+
function emitMethod(context, rootClient, method, operationGroupName) {
|
|
98
|
+
switch (method.kind) {
|
|
99
|
+
case "basic":
|
|
100
|
+
return emitBasicMethod(context, rootClient, method, operationGroupName);
|
|
101
|
+
case "lro":
|
|
102
|
+
return emitLroMethod(context, rootClient, method, operationGroupName);
|
|
103
|
+
case "paging":
|
|
104
|
+
return emitPagingMethod(context, rootClient, method, operationGroupName);
|
|
105
|
+
default:
|
|
106
|
+
return emitLroPagingMethod(context, rootClient, method, operationGroupName);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function emitOperationGroups(context, client, rootClient, prefix) {
|
|
110
|
+
const operationGroups = [];
|
|
111
|
+
for (const method of client.methods) {
|
|
112
|
+
if (method.kind === "clientaccessor") {
|
|
113
|
+
const operationGroup = method.response;
|
|
114
|
+
const name = `${prefix}${operationGroup.name}`;
|
|
115
|
+
let operations = [];
|
|
116
|
+
for (const method of operationGroup.methods) {
|
|
117
|
+
if (method.kind === "clientaccessor")
|
|
118
|
+
continue;
|
|
119
|
+
operations = operations.concat(emitMethod(context, rootClient, method, name));
|
|
120
|
+
}
|
|
121
|
+
operationGroups.push({
|
|
122
|
+
name: name,
|
|
123
|
+
className: name,
|
|
124
|
+
propertyName: operationGroup.name,
|
|
125
|
+
operations: operations,
|
|
126
|
+
operationGroups: emitOperationGroups(context, operationGroup, rootClient, name),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// root client should deal with mixin operation group
|
|
131
|
+
if (prefix === "") {
|
|
132
|
+
let operations = [];
|
|
133
|
+
for (const method of client.methods) {
|
|
134
|
+
if (method.kind === "clientaccessor")
|
|
135
|
+
continue;
|
|
136
|
+
operations = operations.concat(emitMethod(context, rootClient, method, ""));
|
|
137
|
+
}
|
|
138
|
+
if (operations.length > 0) {
|
|
139
|
+
operationGroups.push({
|
|
140
|
+
name: "",
|
|
141
|
+
className: "",
|
|
142
|
+
propertyName: "",
|
|
143
|
+
operations: operations,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return operationGroups.length > 0 ? operationGroups : undefined;
|
|
148
|
+
}
|
|
149
|
+
function emitClient(context, client) {
|
|
150
|
+
var _a, _b, _c, _d;
|
|
151
|
+
if (client.initialization) {
|
|
152
|
+
context.__endpointPathParameters = [];
|
|
153
|
+
}
|
|
154
|
+
const parameters = (_b = (_a = client.initialization) === null || _a === void 0 ? void 0 : _a.properties.map((x) => emitMethodParameter(context, client, x)).reduce((a, b) => [...a, ...b])) !== null && _b !== void 0 ? _b : [];
|
|
155
|
+
const endpointParameter = (_c = client.initialization) === null || _c === void 0 ? void 0 : _c.properties.find((x) => x.kind === "endpoint");
|
|
156
|
+
const operationGroups = emitOperationGroups(context, client, client, "");
|
|
157
|
+
if (context.__subscriptionIdPathParameter) {
|
|
158
|
+
parameters.push(context.__subscriptionIdPathParameter);
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
name: client.name,
|
|
162
|
+
description: (_d = client.description) !== null && _d !== void 0 ? _d : "",
|
|
163
|
+
parameters,
|
|
164
|
+
operationGroups,
|
|
165
|
+
url: endpointParameter === null || endpointParameter === void 0 ? void 0 : endpointParameter.type.serverUrl,
|
|
166
|
+
apiVersions: client.apiVersions,
|
|
167
|
+
arm: context.arm,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
export function emitCodeModel(sdkContext) {
|
|
171
|
+
// Get types
|
|
172
|
+
const sdkPackage = sdkContext.experimental_sdkPackage;
|
|
173
|
+
const codeModel = {
|
|
174
|
+
namespace: removeUnderscoresFromNamespace(sdkPackage.rootNamespace).toLowerCase(),
|
|
175
|
+
clients: [],
|
|
176
|
+
subnamespaceToClients: {},
|
|
177
|
+
};
|
|
178
|
+
for (const model of sdkPackage.models) {
|
|
179
|
+
if (model.name === "") {
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
getType(sdkContext, model);
|
|
183
|
+
}
|
|
184
|
+
for (const sdkEnum of sdkPackage.enums) {
|
|
185
|
+
if (sdkEnum.usage === UsageFlags.ApiVersionEnum) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
getType(sdkContext, sdkEnum);
|
|
189
|
+
}
|
|
190
|
+
for (const client of sdkPackage.clients) {
|
|
191
|
+
if (client.initialization.access === "public") {
|
|
192
|
+
// right now to keep python changes minimal, we're just supporting top level clients
|
|
193
|
+
codeModel["clients"].push(emitClient(sdkContext, client));
|
|
194
|
+
}
|
|
195
|
+
if (client.nameSpace === sdkPackage.rootNamespace) {
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
codeModel["subnamespaceToClients"][client.nameSpace] = emitClient(sdkContext, client);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
codeModel["types"] = [...typesMap.values(), ...Object.values(KnownTypes), ...simpleTypesMap.values()];
|
|
202
|
+
codeModel["crossLanguagePackageId"] = ignoreDiagnostics(getCrossLanguagePackageId(sdkContext));
|
|
203
|
+
return codeModel;
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=code-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-model.js","sourceRoot":"","sources":["../../src/code-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAWH,UAAU,EACV,yBAAyB,GAC5B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAElH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,SAAS,eAAe,CACpB,OAA4C,EAC5C,UAA4C,EAC5C,MAAgD,EAChD,kBAA0B;IAE1B,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IACnG,QAAQ,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE;QAC3B,KAAK,MAAM;YACP,OAAO,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC;QAChF;YACI,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KACpE;AACL,CAAC;AAED,SAAS,aAAa,CAClB,OAA4C,EAC5C,UAA4C,EAC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":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../src/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAEH,UAAU,EAGb,MAAM,6CAA6C,CAAC;AAKrD,OAAO,EAAE,oBAAoB,EAAoB,MAAM,UAAU,CAAC;AAIlE,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,KAAK,GAAG,MAAM,CAUjE;AAyCD,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,CAAC,iBAuCvE"}
|