@azure-typespec/http-client-csharp-mgmt 1.0.0-alpha.20250508.1 → 1.0.0-alpha.20250509.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.
@@ -1 +1 @@
1
- {"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../emitter/src/emitter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AASjD,OAAO,EAEL,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAW5C,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,mBAAmB,CAAC,iBAOtE"}
1
+ {"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../emitter/src/emitter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,OAAO,EAEL,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAI5C,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,mBAAmB,CAAC,iBAOtE"}
@@ -2,12 +2,7 @@
2
2
  // Licensed under the MIT License. See License.txt in the project root for license information.
3
3
  import { $onEmit as $onAzureEmit } from "@azure-typespec/http-client-csharp";
4
4
  import { azureSDKContextOptions } from "./sdk-context-options.js";
5
- import { calculateResourceTypeFromPath } from "./resource-type.js";
6
- const armResourceOperations = "Azure.ResourceManager.@armResourceOperations";
7
- const armResourceRead = "Azure.ResourceManager.@armResourceRead";
8
- const armResourceCreateOrUpdate = "Azure.ResourceManager.@armResourceCreateOrUpdate";
9
- const singleton = "Azure.ResourceManager.@singleton";
10
- const resourceMetadata = "Azure.ClientGenerator.Core.@resourceSchema";
5
+ import { updateClients } from "./resource-detection.js";
11
6
  export async function $onEmit(context) {
12
7
  context.options["generator-name"] ??= "ManagementClientGenerator";
13
8
  context.options["update-code-model"] = updateCodeModel;
@@ -17,60 +12,7 @@ export async function $onEmit(context) {
17
12
  await $onAzureEmit(context);
18
13
  }
19
14
  function updateCodeModel(codeModel) {
20
- for (const client of codeModel.clients) {
21
- updateClient(client);
22
- }
23
- function updateClient(client) {
24
- // TODO: we can implement this decorator in TCGC until we meet the corner case
25
- // if the client has resourceMetadata decorator, it is a resource client and we don't need to add it again
26
- if (client.decorators?.some((d) => d.name == resourceMetadata)) {
27
- return;
28
- }
29
- // TODO: Once we have the ability to get resource hierarchy from TCGC directly, we can remove this implementation
30
- // A resource client should have decorator armResourceOperations and contains either a get operation(containing armResourceRead deocrator) or a put operation(containing armResourceCreateOrUpdate decorator)
31
- if (client.decorators?.some((d) => d.name == armResourceOperations) &&
32
- client.methods.some((m) => m.operation.decorators?.some((d) => d.name == armResourceRead || armResourceCreateOrUpdate))) {
33
- let resourceModel = undefined;
34
- let isSingleton = false;
35
- let resourceType = undefined;
36
- // We will try to get resource metadata from put operation firstly, if not found, we will try to get it from get operation
37
- const putOperation = client.methods.find((m) => m.operation.decorators?.some((d) => d.name == armResourceCreateOrUpdate))?.operation;
38
- if (putOperation) {
39
- const path = putOperation.path;
40
- resourceType = calculateResourceTypeFromPath(path);
41
- resourceModel = putOperation.responses.filter((r) => r.bodyType)[0]
42
- .bodyType;
43
- isSingleton =
44
- resourceModel.decorators?.some((d) => d.name == singleton) ?? false;
45
- }
46
- else {
47
- const getOperation = client.methods.find((m) => m.operation.decorators?.some((d) => d.name == armResourceRead))?.operation;
48
- if (getOperation) {
49
- const path = getOperation.path;
50
- resourceType = calculateResourceTypeFromPath(path);
51
- resourceModel = getOperation.responses.filter((r) => r.bodyType)[0]
52
- .bodyType;
53
- isSingleton =
54
- resourceModel.decorators?.some((d) => d.name == singleton) ?? false;
55
- }
56
- }
57
- const resourceMetadataDecorator = {
58
- name: resourceMetadata,
59
- arguments: {}
60
- };
61
- resourceMetadataDecorator.arguments["resourceModel"] =
62
- resourceModel?.crossLanguageDefinitionId;
63
- resourceMetadataDecorator.arguments["isSingleton"] =
64
- isSingleton.toString();
65
- resourceMetadataDecorator.arguments["resourceType"] = resourceType;
66
- client.decorators.push(resourceMetadataDecorator);
67
- }
68
- if (client.children) {
69
- for (const child of client.children) {
70
- updateClient(child);
71
- }
72
- }
73
- }
15
+ updateClients(codeModel);
74
16
  return codeModel;
75
17
  }
76
18
  //# sourceMappingURL=emitter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../emitter/src/emitter.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAW/F,OAAO,EACL,OAAO,IAAI,YAAY,EAExB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,qBAAqB,GAAG,8CAA8C,CAAC;AAC7E,MAAM,eAAe,GAAG,wCAAwC,CAAC;AACjE,MAAM,yBAAyB,GAC7B,kDAAkD,CAAC;AACrD,MAAM,SAAS,GAAG,kCAAkC,CAAC;AACrD,MAAM,gBAAgB,GAAG,4CAA4C,CAAC;AAEtE,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,OAAyC;IACrE,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,2BAA2B,CAAC;IAClE,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC;IACvD,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IAC9D,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,sBAAsB,CAAC;IAClE,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC5C,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,eAAe,CAAC,SAAoB;IAC3C,KAAK,MAAM,MAAM,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;QACvC,YAAY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AC,CAAC;QACpD,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACpB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACpC,YAAY,CAAC,KAAoB,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../emitter/src/emitter.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAM/F,OAAO,EACL,OAAO,IAAI,YAAY,EAExB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,OAAyC;IACrE,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,2BAA2B,CAAC;IAClE,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC;IACvD,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IAC9D,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,sBAAsB,CAAC;IAClE,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC5C,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,eAAe,CAAC,SAAoB;IAC3C,aAAa,CAAC,SAAS,CAAC,CAAC;IAEzB,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { CodeModel } from "@typespec/http-client-csharp";
2
+ export declare function updateClients(codeModel: CodeModel): void;
3
+ //# sourceMappingURL=resource-detection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-detection.d.ts","sourceRoot":"","sources":["../../emitter/src/resource-detection.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,SAAS,EAGV,MAAM,8BAA8B,CAAC;AActC,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,QAsBjD"}
@@ -0,0 +1,99 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License. See License.txt in the project root for license information.
3
+ import { calculateResourceTypeFromPath } from "./resource-metadata.js";
4
+ import { armResourceCreateOrUpdate, armResourceOperations, armResourceRead, resourceMetadata, singleton } from "./sdk-context-options.js";
5
+ export function updateClients(codeModel) {
6
+ // first we flatten all possible clients in the code model
7
+ const clients = getAllClients(codeModel);
8
+ // to fully calculation the resource metadata, we have to go with 2 passes
9
+ // in which the first pass we gather everything we could for each client
10
+ // the second pass we figure out there cross references between the clients (such as parent resource)
11
+ // then pass to update all the clients with their own information
12
+ const metadata = new Map();
13
+ for (const client of clients) {
14
+ gatherResourceMetadata(client, metadata);
15
+ }
16
+ // populate the parent resource information
17
+ // the last step, add the decorator to the client
18
+ for (const client of clients) {
19
+ const resourceMetadata = metadata.get(client);
20
+ if (resourceMetadata) {
21
+ addResourceMetadata(client, resourceMetadata);
22
+ }
23
+ }
24
+ }
25
+ function getAllClients(codeModel) {
26
+ const clients = [];
27
+ for (const client of codeModel.clients) {
28
+ traverseClient(client);
29
+ }
30
+ return clients;
31
+ function traverseClient(client) {
32
+ clients.push(client);
33
+ if (client.children) {
34
+ for (const child of client.children) {
35
+ traverseClient(child);
36
+ }
37
+ }
38
+ }
39
+ }
40
+ function gatherResourceMetadata(client, metadataMap) {
41
+ // TODO: we can implement this decorator in TCGC until we meet the corner case
42
+ // if the client has resourceMetadata decorator, it is a resource client and we don't need to add it again
43
+ if (client.decorators?.some((d) => d.name == resourceMetadata)) {
44
+ return;
45
+ }
46
+ // TODO: Once we have the ability to get resource hierarchy from TCGC directly, we can remove this implementation
47
+ // A resource client should have decorator armResourceOperations and contains either a get operation(containing armResourceRead deocrator) or a put operation(containing armResourceCreateOrUpdate decorator)
48
+ if (client.decorators?.some((d) => d.name == armResourceOperations) &&
49
+ client.methods.some((m) => m.operation.decorators?.some((d) => d.name == armResourceRead || armResourceCreateOrUpdate))) {
50
+ let resourceModel = undefined;
51
+ let isSingleton = false;
52
+ let resourceType = undefined;
53
+ // We will try to get resource metadata from put operation firstly, if not found, we will try to get it from get operation
54
+ const putOperation = client.methods.find((m) => m.operation.decorators?.some((d) => d.name == armResourceCreateOrUpdate))?.operation;
55
+ if (putOperation) {
56
+ const path = putOperation.path;
57
+ resourceType = calculateResourceTypeFromPath(path);
58
+ resourceModel = putOperation.responses.filter((r) => r.bodyType)[0]
59
+ .bodyType;
60
+ isSingleton =
61
+ resourceModel.decorators?.some((d) => d.name == singleton) ?? false;
62
+ }
63
+ else {
64
+ const getOperation = client.methods.find((m) => m.operation.decorators?.some((d) => d.name == armResourceRead))?.operation;
65
+ if (getOperation) {
66
+ const path = getOperation.path;
67
+ resourceType = calculateResourceTypeFromPath(path);
68
+ resourceModel = getOperation.responses.filter((r) => r.bodyType)[0]
69
+ .bodyType;
70
+ isSingleton =
71
+ resourceModel.decorators?.some((d) => d.name == singleton) ?? false;
72
+ }
73
+ }
74
+ if (resourceModel && resourceType) {
75
+ const metadata = {
76
+ resourceModel: resourceModel,
77
+ resourceClient: client,
78
+ resourceType: resourceType,
79
+ isSingleton: isSingleton
80
+ };
81
+ metadataMap.set(client, metadata);
82
+ }
83
+ }
84
+ }
85
+ function addResourceMetadata(client, metadata) {
86
+ const resourceMetadataDecorator = {
87
+ name: resourceMetadata,
88
+ arguments: {
89
+ resourceModel: metadata.resourceModel.crossLanguageDefinitionId,
90
+ isSingleton: metadata.isSingleton,
91
+ resourceType: metadata.resourceType
92
+ }
93
+ };
94
+ if (!client.decorators) {
95
+ client.decorators = [];
96
+ }
97
+ client.decorators.push(resourceMetadataDecorator);
98
+ }
99
+ //# sourceMappingURL=resource-detection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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AE,QAA0B;IAC1E,MAAM,yBAAyB,GAAkB;QAC/C,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE;YACT,aAAa,EAAE,QAAQ,CAAC,aAAa,CAAC,yBAAyB;YAC/D,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,YAAY,EAAE,QAAQ,CAAC,YAAY;SACpC;KACF,CAAC;IAEF,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { InputClient, InputModelType } from "@typespec/http-client-csharp";
2
+ export declare function calculateResourceTypeFromPath(path: string): string;
3
+ export interface ResourceMetadata {
4
+ resourceType: string;
5
+ resourceModel: InputModelType;
6
+ resourceClient: InputClient;
7
+ isSingleton: boolean;
8
+ }
9
+ //# sourceMappingURL=resource-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-metadata.d.ts","sourceRoot":"","sources":["../../emitter/src/resource-metadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQ3E,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBlE;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,cAAc,CAAC;IAC9B,cAAc,EAAE,WAAW,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;CACtB"}
@@ -28,4 +28,4 @@ export function calculateResourceTypeFromPath(path) {
28
28
  return result;
29
29
  }, "");
30
30
  }
31
- //# sourceMappingURL=resource-type.js.map
31
+ //# sourceMappingURL=resource-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-metadata.js","sourceRoot":"","sources":["../../emitter/src/resource-metadata.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAI/F,MAAM,wBAAwB,GAC5B,gDAAgD,CAAC;AACnD,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AACjD,MAAM,iBAAiB,GAAG,UAAU,CAAC;AACrC,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B,MAAM,UAAU,6BAA6B,CAAC,IAAY;IACxD,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC9C,IAAI,aAAa,KAAK,CAAC,CAAC,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;YAC9C,OAAO,oCAAoC,CAAC;QAC9C,CAAC;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC;YACpD,OAAO,mCAAmC,CAAC;QAC7C,CAAC;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;YAC9C,OAAO,6BAA6B,CAAC;QACvC,CAAC;QACD,MAAM,QAAQ,IAAI,6BAA6B,CAAC;IAClD,CAAC;IAED,OAAO,IAAI;SACR,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC,MAAM,CAAC;SAC3C,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;QACjC,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC;YAChC,OAAO,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,OAAO,EAAE,CAAC;;YACrD,OAAO,MAAM,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC"}
@@ -1,3 +1,9 @@
1
1
  import { CreateSdkContextOptions } from "@azure-tools/typespec-client-generator-core";
2
+ export declare const parentResource = "TypeSpec.Rest.@parentResource";
3
+ export declare const armResourceOperations = "Azure.ResourceManager.@armResourceOperations";
4
+ export declare const armResourceRead = "Azure.ResourceManager.@armResourceRead";
5
+ export declare const armResourceCreateOrUpdate = "Azure.ResourceManager.@armResourceCreateOrUpdate";
6
+ export declare const singleton = "Azure.ResourceManager.@singleton";
7
+ export declare const resourceMetadata = "Azure.ClientGenerator.Core.@resourceSchema";
2
8
  export declare const azureSDKContextOptions: CreateSdkContextOptions;
3
9
  //# sourceMappingURL=sdk-context-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk-context-options.d.ts","sourceRoot":"","sources":["../../emitter/src/sdk-context-options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAEtF,eAAO,MAAM,sBAAsB,EAAE,uBAqBpC,CAAC"}
1
+ {"version":3,"file":"sdk-context-options.d.ts","sourceRoot":"","sources":["../../emitter/src/sdk-context-options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAWtF,eAAO,MAAM,cAAc,kCAAkC,CAAC;AAI9D,eAAO,MAAM,qBAAqB,iDACc,CAAC;AAKjD,eAAO,MAAM,eAAe,2CAA2C,CAAC;AAIxE,eAAO,MAAM,yBAAyB,qDACc,CAAC;AAIrD,eAAO,MAAM,SAAS,qCAAqC,CAAC;AAM5D,eAAO,MAAM,gBAAgB,+CAA+C,CAAC;AAI7E,eAAO,MAAM,sBAAsB,EAAE,uBAepC,CAAC"}
@@ -1,25 +1,42 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License. See License.txt in the project root for license information.
3
+ // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-client-generator-core/README.md#usesystemtextjsonconverter
4
+ const useSystemTextJsonConverterRegex = "Azure\\.ClientGenerator\\.Core\\.@useSystemTextJsonConverter";
5
+ // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#armprovidernamespace
6
+ const armProviderNamespaceRegex = "Azure\\.ResourceManager\\.@armProviderNamespace";
7
+ // https://github.com/microsoft/typespec/blob/main/packages/rest/README.md#parentresource
8
+ export const parentResource = "TypeSpec.Rest.@parentResource";
9
+ const parentResourceRegex = "TypeSpec\\.Rest\\.@parentResource";
10
+ // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#armresourceoperations
11
+ export const armResourceOperations = "Azure.ResourceManager.@armResourceOperations";
12
+ const armResourceOperationsRegex = "Azure\\.ResourceManager\\.@armResourceOperations";
13
+ // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#armResourceRead
14
+ export const armResourceRead = "Azure.ResourceManager.@armResourceRead";
15
+ const armResourceReadRegex = "Azure\\.ResourceManager\\.@armResourceRead";
16
+ // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#armresourcecreateorupdate
17
+ export const armResourceCreateOrUpdate = "Azure.ResourceManager.@armResourceCreateOrUpdate";
18
+ const armResourceCreateOrUpdateRegex = "Azure\\.ResourceManager\\.@armResourceCreateOrUpdate";
19
+ // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#singleton
20
+ export const singleton = "Azure.ResourceManager.@singleton";
21
+ const singletonRegex = "Azure\\.ResourceManager\\.@singleton";
22
+ const armResourceInternalRegex = "Azure\\.ResourceManager\\.Private\\.@armResourceInternal";
23
+ // TODO: add this decorator to TCGC
24
+ export const resourceMetadata = "Azure.ClientGenerator.Core.@resourceSchema";
25
+ const resourceMetadataRegex = "Azure\\.ClientGenerator\\.Core\\.@resourceSchema";
3
26
  export const azureSDKContextOptions = {
4
27
  versioning: {
5
- previewStringRegex: /-preview$/,
28
+ previewStringRegex: /-preview$/
6
29
  },
7
30
  additionalDecorators: [
8
- // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-client-generator-core/README.md#usesystemtextjsonconverter
9
- "Azure\\.ClientGenerator\\.Core\\.@useSystemTextJsonConverter",
10
- // TODO: add this decorator to TCGC
11
- "Azure\\.ClientGenerator\\.Core\\.@resourceSchema",
12
- // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#armprovidernamespace
13
- "Azure\\.ResourceManager\\.@armProviderNamespace",
14
- // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#armresourceoperations
15
- "Azure\\.ResourceManager\\.@armResourceOperations",
16
- // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#armResourceRead
17
- "Azure\\.ResourceManager\\.@armResourceRead",
18
- // https://github.com/microsoft/typespec/blob/main/packages/rest/README.md#parentresource
19
- "TypeSpec\\.Rest\\.parentResource",
20
- // https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#singleton
21
- "Azure\\.ResourceManager\\.@singleton",
22
- "Azure\\.ResourceManager\\.Private\\.@armResourceInternal"
31
+ useSystemTextJsonConverterRegex,
32
+ resourceMetadataRegex,
33
+ armProviderNamespaceRegex,
34
+ armResourceOperationsRegex,
35
+ armResourceCreateOrUpdateRegex,
36
+ armResourceReadRegex,
37
+ parentResourceRegex,
38
+ singletonRegex,
39
+ armResourceInternalRegex,
23
40
  ]
24
41
  };
25
42
  //# sourceMappingURL=sdk-context-options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk-context-options.js","sourceRoot":"","sources":["../../emitter/src/sdk-context-options.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAI/F,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,UAAU,EAAE;QACV,kBAAkB,EAAE,WAAW;KAChC;IACD,oBAAoB,EAAE;QACpB,iIAAiI;QACjI,8DAA8D;QAC9D,mCAAmC;QACnC,kDAAkD;QAClD,4HAA4H;QAC5H,iDAAiD;QACjD,6HAA6H;QAC7H,kDAAkD;QAClD,uHAAuH;QACvH,4CAA4C;QAC5C,yFAAyF;QACzF,kCAAkC;QAClC,iHAAiH;QACjH,sCAAsC;QACtC,0DAA0D;KAC3D;CACF,CAAC"}
1
+ {"version":3,"file":"sdk-context-options.js","sourceRoot":"","sources":["../../emitter/src/sdk-context-options.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAI/F,iIAAiI;AACjI,MAAM,+BAA+B,GACnC,8DAA8D,CAAC;AAEjE,4HAA4H;AAC5H,MAAM,yBAAyB,GAC7B,iDAAiD,CAAC;AAEpD,yFAAyF;AACzF,MAAM,CAAC,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAC9D,MAAM,mBAAmB,GAAG,mCAAmC,CAAC;AAEhE,6HAA6H;AAC7H,MAAM,CAAC,MAAM,qBAAqB,GAChC,8CAA8C,CAAC;AACjD,MAAM,0BAA0B,GAC9B,kDAAkD,CAAC;AAErD,uHAAuH;AACvH,MAAM,CAAC,MAAM,eAAe,GAAG,wCAAwC,CAAC;AACxE,MAAM,oBAAoB,GAAG,4CAA4C,CAAC;AAE1E,iIAAiI;AACjI,MAAM,CAAC,MAAM,yBAAyB,GACpC,kDAAkD,CAAC;AACrD,MAAM,8BAA8B,GAClC,sDAAsD,CAAC;AACzD,iHAAiH;AACjH,MAAM,CAAC,MAAM,SAAS,GAAG,kCAAkC,CAAC;AAC5D,MAAM,cAAc,GAAG,sCAAsC,CAAC;AAE9D,MAAM,wBAAwB,GAAG,0DAA0D,CAAC;AAE5F,mCAAmC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,4CAA4C,CAAC;AAC7E,MAAM,qBAAqB,GACzB,kDAAkD,CAAC;AAErD,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,UAAU,EAAE;QACV,kBAAkB,EAAE,WAAW;KAChC;IACD,oBAAoB,EAAE;QACpB,+BAA+B;QAC/B,qBAAqB;QACrB,yBAAyB;QACzB,0BAA0B;QAC1B,8BAA8B;QAC9B,oBAAoB;QACpB,mBAAmB;QACnB,cAAc;QACd,wBAAwB;KACzB;CACF,CAAC"}
@@ -6,7 +6,7 @@
6
6
  "compilationOptions": {},
7
7
  "targets": {
8
8
  ".NETCoreApp,Version=v8.0": {
9
- "Azure.Generator.Mgmt/1.0.0-alpha.20250508.1": {
9
+ "Azure.Generator.Mgmt/1.0.0-alpha.20250509.1": {
10
10
  "dependencies": {
11
11
  "Azure.Core": "1.46.0",
12
12
  "Azure.Generator": "1.0.0-alpha.20250429.2",
@@ -619,7 +619,7 @@
619
619
  }
620
620
  },
621
621
  "libraries": {
622
- "Azure.Generator.Mgmt/1.0.0-alpha.20250508.1": {
622
+ "Azure.Generator.Mgmt/1.0.0-alpha.20250509.1": {
623
623
  "type": "project",
624
624
  "serviceable": false,
625
625
  "sha512": ""
@@ -53,6 +53,18 @@
53
53
  <member name="M:Azure.Generator.Management.ManagementTypeFactory.CreateClientCore(Microsoft.TypeSpec.Generator.Input.InputClient)">
54
54
  <inheritdoc/>
55
55
  </member>
56
+ <member name="M:Azure.Generator.Management.ManagementTypeFactory.CreateCSharpTypeCore(Microsoft.TypeSpec.Generator.Input.InputType)">
57
+ <inheritdoc/>
58
+ </member>
59
+ <member name="M:Azure.Generator.Management.ManagementTypeFactory.CreateModelCore(Microsoft.TypeSpec.Generator.Input.InputModelType)">
60
+ <inheritdoc/>
61
+ </member>
62
+ <member name="M:Azure.Generator.Management.ManagementTypeFactory.SerializeJsonValue(System.Type,Microsoft.TypeSpec.Generator.Expressions.ValueExpression,Microsoft.TypeSpec.Generator.Snippets.ScopedApi{System.Text.Json.Utf8JsonWriter},Microsoft.TypeSpec.Generator.Snippets.ScopedApi{System.ClientModel.Primitives.ModelReaderWriterOptions},Microsoft.TypeSpec.Generator.Input.SerializationFormat)">
63
+ <inheritdoc/>
64
+ </member>
65
+ <member name="M:Azure.Generator.Management.ManagementTypeFactory.DeserializeJsonValue(System.Type,Microsoft.TypeSpec.Generator.Snippets.ScopedApi{System.Text.Json.JsonElement},Microsoft.TypeSpec.Generator.Input.SerializationFormat)">
66
+ <inheritdoc/>
67
+ </member>
56
68
  <member name="M:Azure.Generator.Management.Models.RequestPath.IsAncestorOf(Azure.Generator.Management.Models.RequestPath)">
57
69
  <summary>
58
70
  Check if this <see cref="T:Azure.Generator.Management.Models.RequestPath"/> is a prefix path of the other request path.
@@ -6,7 +6,7 @@
6
6
  "compilationOptions": {},
7
7
  "targets": {
8
8
  ".NETCoreApp,Version=v8.0": {
9
- "Azure.Generator.Mgmt/1.0.0-alpha.20250508.1": {
9
+ "Azure.Generator.Mgmt/1.0.0-alpha.20250509.1": {
10
10
  "dependencies": {
11
11
  "Azure.Core": "1.46.0",
12
12
  "Azure.Generator": "1.0.0-alpha.20250429.2",
@@ -619,7 +619,7 @@
619
619
  }
620
620
  },
621
621
  "libraries": {
622
- "Azure.Generator.Mgmt/1.0.0-alpha.20250508.1": {
622
+ "Azure.Generator.Mgmt/1.0.0-alpha.20250509.1": {
623
623
  "type": "project",
624
624
  "serviceable": false,
625
625
  "sha512": ""
@@ -53,6 +53,18 @@
53
53
  <member name="M:Azure.Generator.Management.ManagementTypeFactory.CreateClientCore(Microsoft.TypeSpec.Generator.Input.InputClient)">
54
54
  <inheritdoc/>
55
55
  </member>
56
+ <member name="M:Azure.Generator.Management.ManagementTypeFactory.CreateCSharpTypeCore(Microsoft.TypeSpec.Generator.Input.InputType)">
57
+ <inheritdoc/>
58
+ </member>
59
+ <member name="M:Azure.Generator.Management.ManagementTypeFactory.CreateModelCore(Microsoft.TypeSpec.Generator.Input.InputModelType)">
60
+ <inheritdoc/>
61
+ </member>
62
+ <member name="M:Azure.Generator.Management.ManagementTypeFactory.SerializeJsonValue(System.Type,Microsoft.TypeSpec.Generator.Expressions.ValueExpression,Microsoft.TypeSpec.Generator.Snippets.ScopedApi{System.Text.Json.Utf8JsonWriter},Microsoft.TypeSpec.Generator.Snippets.ScopedApi{System.ClientModel.Primitives.ModelReaderWriterOptions},Microsoft.TypeSpec.Generator.Input.SerializationFormat)">
63
+ <inheritdoc/>
64
+ </member>
65
+ <member name="M:Azure.Generator.Management.ManagementTypeFactory.DeserializeJsonValue(System.Type,Microsoft.TypeSpec.Generator.Snippets.ScopedApi{System.Text.Json.JsonElement},Microsoft.TypeSpec.Generator.Input.SerializationFormat)">
66
+ <inheritdoc/>
67
+ </member>
56
68
  <member name="M:Azure.Generator.Management.Models.RequestPath.IsAncestorOf(Azure.Generator.Management.Models.RequestPath)">
57
69
  <summary>
58
70
  Check if this <see cref="T:Azure.Generator.Management.Models.RequestPath"/> is a prefix path of the other request path.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-typespec/http-client-csharp-mgmt",
3
- "version": "1.0.0-alpha.20250508.1",
3
+ "version": "1.0.0-alpha.20250509.1",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec library for emitting Azure management libraries for C#.",
6
6
  "readme": "https://github.com/Azure/azure-sdk-for-net/blob/main/eng/packages/http-client-csharp-mgmt/README.md",
@@ -1,2 +0,0 @@
1
- export declare function calculateResourceTypeFromPath(path: string): string;
2
- //# sourceMappingURL=resource-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resource-type.d.ts","sourceRoot":"","sources":["../../emitter/src/resource-type.ts"],"names":[],"mappings":"AASA,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBlE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resource-type.js","sourceRoot":"","sources":["../../emitter/src/resource-type.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,MAAM,wBAAwB,GAC5B,gDAAgD,CAAC;AACnD,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AACjD,MAAM,iBAAiB,GAAG,UAAU,CAAC;AACrC,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B,MAAM,UAAU,6BAA6B,CAAC,IAAY;IACxD,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CA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