@azure-typespec/http-client-csharp-mgmt 1.0.0-alpha.20260113.1 → 1.0.0-alpha.20260115.2

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.
Files changed (29) hide show
  1. package/dist/emitter/lib/lib.d.ts +1 -1
  2. package/dist/emitter/lib/lib.d.ts.map +1 -1
  3. package/dist/emitter/lib/lib.js +11 -2
  4. package/dist/emitter/lib/lib.js.map +1 -1
  5. package/dist/emitter/resolve-arm-resources-converter.d.ts.map +1 -1
  6. package/dist/emitter/resolve-arm-resources-converter.js +39 -19
  7. package/dist/emitter/resolve-arm-resources-converter.js.map +1 -1
  8. package/dist/emitter/resource-detection.d.ts.map +1 -1
  9. package/dist/emitter/resource-detection.js +48 -27
  10. package/dist/emitter/resource-detection.js.map +1 -1
  11. package/dist/emitter/resource-metadata.d.ts.map +1 -1
  12. package/dist/emitter/resource-metadata.js +0 -4
  13. package/dist/emitter/resource-metadata.js.map +1 -1
  14. package/dist/emitter/sdk-context-options.d.ts.map +1 -1
  15. package/dist/emitter/sdk-context-options.js +1 -1
  16. package/dist/emitter/sdk-context-options.js.map +1 -1
  17. package/dist/emitter/utils.d.ts +21 -0
  18. package/dist/emitter/utils.d.ts.map +1 -0
  19. package/dist/emitter/utils.js +49 -0
  20. package/dist/emitter/utils.js.map +1 -0
  21. package/dist/generator/Azure.Generator.Management.deps.json +2 -2
  22. package/dist/generator/Azure.Generator.Management.dll +0 -0
  23. package/dist/generator/Azure.Generator.Management.pdb +0 -0
  24. package/dist/generator/Azure.Generator.Management.xml +146 -29
  25. package/dist/generator/net10.0/Azure.Generator.Management.deps.json +2 -2
  26. package/dist/generator/net10.0/Azure.Generator.Management.dll +0 -0
  27. package/dist/generator/net10.0/Azure.Generator.Management.pdb +0 -0
  28. package/dist/generator/net10.0/Azure.Generator.Management.xml +146 -29
  29. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"resource-metadata.d.ts","sourceRoot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,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAyBD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,CAanE;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B;;OAEG;IACH,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,iBAAiB,GACxB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAwBrB"}
1
+ {"version":3,"file":"resource-metadata.d.ts","sourceRoot":"","sources":["../../emitter/src/resource-metadata.ts"],"names":[],"mappings":"AASA,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBlE;AAED,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,eAAe,oBAAoB;IACnC,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,gBAAgB,GACzB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAUrB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,aAAa,CAAC;CAC/B;AAED,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,iBAAiB,EAAE,GAC5B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAQrB;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,qBAAqB,CAAC;IAC5B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,EAAE,aAAa,CAAC;IAC9B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAyBD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,CAanE;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B;;OAEG;IACH,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,iBAAiB,GACxB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAwBrB"}
@@ -3,7 +3,6 @@
3
3
  const ResourceGroupScopePrefix = "/subscriptions/{subscriptionId}/resourceGroups";
4
4
  const SubscriptionScopePrefix = "/subscriptions";
5
5
  const TenantScopePrefix = "/tenants";
6
- const ManagementGroupScopePrefix = "/providers/Microsoft.Management/managementGroups";
7
6
  const Providers = "/providers";
8
7
  export function calculateResourceTypeFromPath(path) {
9
8
  const providerIndex = path.lastIndexOf(Providers);
@@ -17,9 +16,6 @@ export function calculateResourceTypeFromPath(path) {
17
16
  else if (path.startsWith(TenantScopePrefix)) {
18
17
  return "Microsoft.Resources/tenants";
19
18
  }
20
- else if (path.startsWith(ManagementGroupScopePrefix)) {
21
- return "Microsoft.Resources/managementGroups";
22
- }
23
19
  throw `Path ${path} doesn't have resource type`;
24
20
  }
25
21
  return path
@@ -1 +1 @@
1
- {"version":3,"file":"resource-metadata.js","sourceRoot":"","sources":["../../emitter/src/resource-metadata.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,0BAA0B,GAC9B,kDAAkD,CAAC;AACrD,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B,MAAM,UAAU,6BAA6B,CAAC,IAAY;IACxD,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAClD,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;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAAE,CAAC;YACvD,OAAO,sCAAsC,CAAC;QAChD,CAAC;QACD,MAAM,QAAQ,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5E,eAAO,MAAM,qBAAqB,uBAAuB,CAAC;AAI1D,eAAO,MAAM,eAAe,2CAA2C,CAAC;AACxE,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AAItD,eAAO,MAAM,iBAAiB,6CAA6C,CAAC;AAC5E,eAAO,MAAM,qBAAqB,uBAAuB,CAAC;AAI1D,eAAO,MAAM,iBAAiB,6CAA6C,CAAC;AAC5E,eAAO,MAAM,qBAAqB,uBAAuB,CAAC;AAG1D,eAAO,MAAM,8BAA8B,gCAAgC,CAAC;AAC5E,eAAO,MAAM,oCAAoC,sCACZ,CAAC;AACtC,eAAO,MAAM,2BAA2B,6BAA6B,CAAC;AACtE,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AAExE,eAAO,MAAM,wBAAwB,4DACsB,CAAC;AAI5D,eAAO,MAAM,mBAAmB,uDACsB,CAAC;AACvD,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAK9D,eAAO,MAAM,oBAAoB,gDACc,CAAC;AAKhD,eAAO,MAAM,cAAc,0CAA0C,CAAC;AAItE,eAAO,MAAM,qBAAqB,iDACc,CAAC;AAKjD,eAAO,MAAM,gBAAgB,+CAA+C,CAAC;AAG7E,eAAO,MAAM,yBAAyB,wDACiB,CAAC;AAKxD,eAAO,MAAM,iBAAiB,kDACmB,CAAC;AAElD,eAAO,MAAM,wBAAwB,2CACK,CAAC;AAE3C,eAAO,MAAM,sBAAsB,EAAE,uBAuBpC,CAAC"}
@@ -84,7 +84,7 @@ export const azureSDKContextOptions = {
84
84
  singletonRegex,
85
85
  subscriptionResourceRegex,
86
86
  tenantResourceRegex,
87
- armResourceWithParameterRegex,
87
+ armResourceWithParameterRegex
88
88
  ]
89
89
  };
90
90
  //# 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,4HAA4H;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ChD,MAAM,CAAC,MAAM,iBAAiB,GAAG,+CAA+C,CAAC;AAEjF,MAAM,CAAC,MAAM,wBAAwB,GACnC,wCAAwC,CAAC;AAE3C,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,UAAU,EAAE;QACV,kBAAkB,EAAE,WAAW;KAChC;IACD,oBAAoB,EAAE;QACpB,qBAAqB;QACrB,8BAA8B;QAC9B,yBAAyB;QACzB,sBAAsB;QACtB,8BAA8B;QAC9B,sBAAsB;QACtB,wBAAwB;QACxB,oBAAoB;QACpB,0BAA0B;QAC1B,sBAAsB;QACtB,oBAAoB;QACpB,mBAAmB;QACnB,0BAA0B;QAC1B,cAAc;QACd,yBAAyB;QACzB,mBAAmB;QACnB,6BAA6B;KAC9B;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,4HAA4H;AAC5H,MAAM,yBAAyB,GAC7B,iDAAiD,CAAC;AAEpD,yFAAyF;AACzF,MAAM,CAAC,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAC9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AACpD,MAAM,mBAAmB,GAAG,mCAAmC,CAAC;AAEhE,6HAA6H;AAC7H,MAAM,CAAC,MAAM,qBAAqB,GAChC,8CAA8C,CAAC;AACjD,MAAM,0BAA0B,GAC9B,kDAAkD,CAAC;AAErD,iHAAiH;AACjH,MAAM,CAAC,MAAM,SAAS,GAAG,kCAAkC,CAAC;AAC5D,MAAM,cAAc,GAAG,sCAAsC,CAAC;AAE9D,uHAAuH;AACvH,MAAM,CAAC,MAAM,eAAe,GAAG,wCAAwC,CAAC;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AACtD,MAAM,oBAAoB,GAAG,4CAA4C,CAAC;AAE1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,g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,sBAAsB,CAAC;AAC9D,MAAM,wBAAwB,GAC5B,0DAA0D,CAAC;AAE7D,4HAA4H;AAC5H,MAAM,CAAC,MAAM,oBAAoB,GAC/B,6CAA6C,CAAC;AAChD,MAAM,yBAAyB,GAC7B,iDAAiD,CAAC;AAEpD,sHAAsH;AACtH,MAAM,CAAC,MAAM,cAAc,GAAG,uCAAuC,CAAC;AACtE,MAAM,mBAAmB,GAAG,2CAA2C,CAAC;AAExE,6HAA6H;AAC7H,MAAM,CAAC,MAAM,qBAAqB,GAChC,8CAA8C,CAAC;AACjD,MAAM,0BAA0B,GAC9B,kDAAkD,CAAC;AAErD,mCAAmC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,4CAA4C,CAAC;AAC7E,MAAM,qBAAqB,GACzB,kDAAkD,CAAC;AACrD,MAAM,CAAC,MAAM,yBAAyB,GACpC,qDAAqD,CAAC;AACxD,MAAM,8BAA8B,GAClC,2DAA2D,CAAC;AAE9D,gDAAgD;AAChD,MAAM,CAAC,MAAM,iBAAiB,GAC5B,+CAA+C,CAAC;AAElD,MAAM,CAAC,MAAM,wBAAwB,GACnC,wCAAwC,CAAC;AAE3C,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,UAAU,EAAE;QACV,kBAAkB,EAAE,WAAW;KAChC;IACD,oBAAoB,EAAE;QACpB,qBAAqB;QACrB,8BAA8B;QAC9B,yBAAyB;QACzB,sBAAsB;QACtB,8BAA8B;QAC9B,sBAAsB;QACtB,wBAAwB;QACxB,oBAAoB;QACpB,0BAA0B;QAC1B,sBAAsB;QACtB,oBAAoB;QACpB,mBAAmB;QACnB,0BAA0B;QAC1B,cAAc;QACd,yBAAyB;QACzB,mBAAmB;QACnB,6BAA6B;KAC9B;CACF,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Returns true if the segment is a variable segment like {subscriptionId}
3
+ * @param segment the segment
4
+ * @returns
5
+ */
6
+ export declare function isVariableSegment(segment: string): boolean;
7
+ /**
8
+ * Returns true if left path is a prefix of right path
9
+ * @param left the first path
10
+ * @param right the second path
11
+ * @returns
12
+ */
13
+ export declare function isPrefix(left: string, right: string): boolean;
14
+ /**
15
+ * Returns the number of shared segments between two paths. Variable segments are considered as matches.
16
+ * @param left the first path
17
+ * @param right the second path
18
+ * @returns
19
+ */
20
+ export declare function getSharedSegmentCount(left: string, right: string): number;
21
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../emitter/src/utils.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAO7D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAmBzE"}
@@ -0,0 +1,49 @@
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
+ /**
4
+ * Returns true if the segment is a variable segment like {subscriptionId}
5
+ * @param segment the segment
6
+ * @returns
7
+ */
8
+ export function isVariableSegment(segment) {
9
+ return segment.startsWith("{") && segment.endsWith("}");
10
+ }
11
+ /**
12
+ * Returns true if left path is a prefix of right path
13
+ * @param left the first path
14
+ * @param right the second path
15
+ * @returns
16
+ */
17
+ export function isPrefix(left, right) {
18
+ const leftSegments = left.split("/").filter((s) => s.length > 0);
19
+ const rightSegments = right.split("/").filter((s) => s.length > 0);
20
+ const sharedCount = getSharedSegmentCount(left, right);
21
+ return (sharedCount === leftSegments.length && sharedCount <= rightSegments.length);
22
+ }
23
+ /**
24
+ * Returns the number of shared segments between two paths. Variable segments are considered as matches.
25
+ * @param left the first path
26
+ * @param right the second path
27
+ * @returns
28
+ */
29
+ export function getSharedSegmentCount(left, right) {
30
+ const leftSegments = left.split("/").filter((s) => s.length > 0);
31
+ const rightSegments = right.split("/").filter((s) => s.length > 0);
32
+ let count = 0;
33
+ const minLength = Math.min(leftSegments.length, rightSegments.length);
34
+ for (let i = 0; i < minLength; i++) {
35
+ // if both are variables, we consider it as a match
36
+ if (isVariableSegment(leftSegments[i]) &&
37
+ isVariableSegment(rightSegments[i])) {
38
+ count++;
39
+ }
40
+ else if (leftSegments[i] === rightSegments[i]) {
41
+ count++;
42
+ }
43
+ else {
44
+ break;
45
+ }
46
+ }
47
+ return count;
48
+ }
49
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../emitter/src/utils.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAa;IAClD,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACjE,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnE,MAAM,WAAW,GAAG,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvD,OAAO,CACL,WAAW,KAAK,YAAY,CAAC,MAAM,IAAI,WAAW,IAAI,aAAa,CAAC,MAAM,CAC3E,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY,EAAE,KAAa;IAC/D,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACjE,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnE,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACtE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,mDAAmD;QACnD,IACE,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YAClC,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EACnC,CAAC;YACD,KAAK,EAAE,CAAC;QACV,CAAC;aAAM,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,KAAK,EAAE,CAAC;QACV,CAAC;aAAM,CAAC;YACN,MAAM;QACR,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -6,7 +6,7 @@
6
6
  "compilationOptions": {},
7
7
  "targets": {
8
8
  ".NETCoreApp,Version=v10.0": {
9
- "Azure.Generator.Management/1.0.0-alpha.20260113.1": {
9
+ "Azure.Generator.Management/1.0.0-alpha.20260115.2": {
10
10
  "dependencies": {
11
11
  "Azure.Core": "1.50.0",
12
12
  "Azure.Generator": "1.0.0-alpha.20260112.2",
@@ -622,7 +622,7 @@
622
622
  }
623
623
  },
624
624
  "libraries": {
625
- "Azure.Generator.Management/1.0.0-alpha.20260113.1": {
625
+ "Azure.Generator.Management/1.0.0-alpha.20260115.2": {
626
626
  "type": "project",
627
627
  "serviceable": false,
628
628
  "sha512": ""
@@ -89,24 +89,117 @@
89
89
  <member name="M:Azure.Generator.Management.ManagementTypeFactory.CreateNewProjectScaffolding">
90
90
  <inheritdoc/>
91
91
  </member>
92
- <member name="T:Azure.Generator.Management.Models.ArmProviderSchema">
92
+ <member name="T:Azure.Generator.Management.Models.ContextualParameter">
93
93
  <summary>
94
- Represents the unified ARM provider schema containing all resource metadata and non-resource methods.
95
- This consolidates information previously scattered across @resourceSchema and @nonResourceMethodSchema decorators.
94
+ Represents a parameter whose value can be derived contextually from the resource identifier (Id) of its enclosing resource or resource collection.
95
+ <para>
96
+ A <see cref="T:Azure.Generator.Management.Models.ContextualParameter"/> is used in Azure management SDK code generation to model parameters that do not need to be explicitly provided by the caller,
97
+ because their values can be computed from the resource's <see cref="T:Azure.Core.ResourceIdentifier"/>. For example, parameters such as "subscriptionId", "resourceGroupName",
98
+ or the name of a parent resource can often be extracted from the Id property of the resource or its parent.
99
+ </para>
100
+ <para>
101
+ Each contextual parameter is associated with a <c>Key</c> (the constant segment preceding the parameter in the request path),
102
+ a <c>VariableName</c> (the name of the parameter in the path), and a function that builds the value expression from a given `Id` instance.
103
+ </para>
104
+ <para>
105
+ The <see cref="M:Azure.Generator.Management.Models.ContextualParameter.BuildValueExpression(Microsoft.TypeSpec.Generator.Snippets.ScopedApi{Azure.Core.ResourceIdentifier})"/> method is used to generate the code expression that retrieves the parameter value from the Id property,
106
+ enabling the SDK to automatically supply these values in generated client methods.
107
+ </para>
108
+ </summary>
109
+ </member>
110
+ <member name="T:Azure.Generator.Management.Models.OperationContext">
111
+ <summary>
112
+ Represents the context for an Azure resource operation, encapsulating the primary and (optionally) secondary request path patterns
113
+ and their associated contextual parameters.
114
+ <para>
115
+ The <see cref="T:Azure.Generator.Management.Models.OperationContext"/> is used during code generation to determine which parameters for an operation
116
+ can be derived contextually from the resource identifier (Id) of the enclosing resource or resource collection,
117
+ and which must be supplied by the caller. It analyzes the request path(s) to build a list of <see cref="T:Azure.Generator.Management.Models.ContextualParameter"/>s,
118
+ which describe how to extract parameter values from the Id property.
119
+ </para>
120
+ <para>
121
+ A secondary contextual path is only provided in the case of a resource collection for a "tuple resource".
122
+ Unlike regular resources, which can be specified from their parent by a single parameter (typically their name),
123
+ tuple resources require multiple parameters to be specified from their parent—hence the name "tuple resource".
124
+ In such cases, the resource collection may need to take additional parameters from its constructor,
125
+ and the secondary contextual path is used to model this scenario and extract those parameters.
126
+ </para>
127
+ <para>
128
+ The <see cref="M:Azure.Generator.Management.Models.OperationContext.BuildParameterMapping(Azure.Generator.Management.Models.RequestPathPattern)"/> method enables mapping operation path parameters to their contextual sources,
129
+ supporting both primary and tuple resource collection scenarios.
130
+ </para>
131
+ </summary>
132
+ </member>
133
+ <member name="M:Azure.Generator.Management.Models.OperationContext.#ctor(Azure.Generator.Management.Models.RequestPathPattern,Azure.Generator.Management.Models.RequestPathPattern,System.Func{System.String,Microsoft.TypeSpec.Generator.Providers.FieldProvider})">
134
+ <summary>
135
+ Initializes a new instance of the OperationContext class with the specified primary and secondary request
136
+ path patterns.
137
+ </summary>
138
+ <param name="contextualPath">The primary request path pattern that defines the main context for the operation. Cannot be null.</param>
139
+ <param name="secondaryContextualPath">An optional secondary request path pattern that provides additional context for the operation. Can be null
140
+ if no secondary context is required.</param>
141
+ <param name="fieldSelector">The function to get the corresponding field for secondary contextual parameters.</param>
142
+ </member>
143
+ <member name="M:Azure.Generator.Management.Models.OperationContext.BuildContextualParameters(Azure.Generator.Management.Models.RequestPathPattern)">
144
+ <summary>
145
+ This method accepts a <see cref="T:Azure.Generator.Management.Models.RequestPathPattern"/> as a contextual request path pattern
146
+ of a certain resource or resource collection class,
147
+ and builds a list of <see cref="T:Azure.Generator.Management.Models.ContextualParameter"/>s that represent the parameters
148
+ provided by this contextual request path pattern.
96
149
  </summary>
150
+ <param name="contextualPath">The contextual request path pattern.</param>
151
+ <returns></returns>
97
152
  </member>
98
- <member name="M:Azure.Generator.Management.Models.ArmProviderSchema.Deserialize(System.Collections.Generic.IReadOnlyDictionary{System.String,System.BinaryData},Azure.Generator.Management.ManagementInputLibrary,System.Func{Azure.Generator.Management.Models.NonResourceMethod,System.Boolean})">
153
+ <member name="M:Azure.Generator.Management.Models.OperationContext.BuildParameterMapping(Azure.Generator.Management.Models.RequestPathPattern)">
99
154
  <summary>
100
- Deserializes the ArmProviderSchema from decorator arguments.
155
+ Builds a mapping from operation path parameters to contextual parameters.
156
+ Parameters are matched based on the position of their variable segments within the shared
157
+ prefix between the operation path and the contextual (and secondary contextual) paths.
101
158
  </summary>
102
- <param name="arguments">The decorator arguments containing resources and nonResourceMethods data</param>
103
- <param name="library">The management input library containing models cache</param>
104
- <param name="methodFilter">Optional predicate to filter non-resource methods</param>
105
- <returns>A new ArmProviderSchema instance</returns>
159
+ <param name="operationPath">The operation's request path.</param>
160
+ <returns>A parameter mapping that maps operation parameter names to contextual parameters.</returns>
106
161
  </member>
107
- <member name="T:Azure.Generator.Management.Models.ContextualParameter">
162
+ <member name="T:Azure.Generator.Management.Models.ParameterContextMapping">
163
+ <summary>
164
+ Represents a mapping between an operation parameter name and its contextual information.
165
+ <para>
166
+ The <see cref="T:Azure.Generator.Management.Models.ParameterContextMapping"/> associates a parameter name with a <see cref="P:Azure.Generator.Management.Models.ParameterContextMapping.ContextualParameter"/>,
167
+ if the parameter can be derived from the resource identifier (Id) of the enclosing resource or resource collection.
168
+ If <see cref="P:Azure.Generator.Management.Models.ParameterContextMapping.ContextualParameter"/> is <c>null</c>, the parameter is considered a pass-through parameter and must be provided by the caller.
169
+ </para>
170
+ <para>
171
+ This record is used within <see cref="T:Azure.Generator.Management.Models.ParameterContextRegistry"/> to describe how each operation parameter should be resolved
172
+ during code generation for Azure management SDKs.
173
+ </para>
174
+ </summary>
175
+ </member>
176
+ <member name="M:Azure.Generator.Management.Models.ParameterContextMapping.#ctor(System.String,Azure.Generator.Management.Models.ContextualParameter)">
108
177
  <summary>
109
- A <see cref="T:Azure.Generator.Management.Models.ContextualParameter"/> represents a parameter which could be determined contextually from the Id property of its enclosing resource or resource collection class.
178
+ Represents a mapping between an operation parameter name and its contextual information.
179
+ <para>
180
+ The <see cref="T:Azure.Generator.Management.Models.ParameterContextMapping"/> associates a parameter name with a <see cref="P:Azure.Generator.Management.Models.ParameterContextMapping.ContextualParameter"/>,
181
+ if the parameter can be derived from the resource identifier (Id) of the enclosing resource or resource collection.
182
+ If <see cref="P:Azure.Generator.Management.Models.ParameterContextMapping.ContextualParameter"/> is <c>null</c>, the parameter is considered a pass-through parameter and must be provided by the caller.
183
+ </para>
184
+ <para>
185
+ This record is used within <see cref="T:Azure.Generator.Management.Models.ParameterContextRegistry"/> to describe how each operation parameter should be resolved
186
+ during code generation for Azure management SDKs.
187
+ </para>
188
+ </summary>
189
+ </member>
190
+ <member name="T:Azure.Generator.Management.Models.ParameterContextRegistry">
191
+ <summary>
192
+ Represents a registry that maps parameter names to their contextual information for a given operation.
193
+ <para>
194
+ The <see cref="T:Azure.Generator.Management.Models.ParameterContextRegistry"/> is used to associate operation parameters with their corresponding
195
+ <see cref="T:Azure.Generator.Management.Models.ContextualParameter"/> (if available), which describes how a parameter value can be derived from the
196
+ resource identifier (Id) of the enclosing resource or resource collection. This mapping enables the generator
197
+ to determine which parameters are contextually available and which are pass-through (must be supplied by the caller).
198
+ </para>
199
+ <para>
200
+ The registry provides lookup and enumeration capabilities for parameter mappings, and supports argument population
201
+ for method invocations by resolving contextual values or falling back to method parameters as needed.
202
+ </para>
110
203
  </summary>
111
204
  </member>
112
205
  <member name="T:Azure.Generator.Management.Models.RequestPathPattern">
@@ -132,13 +225,17 @@
132
225
  <returns></returns>
133
226
  <exception cref="T:System.InvalidOperationException">if this.IsAncestorOf(other) is false</exception>
134
227
  </member>
135
- <member name="M:Azure.Generator.Management.Models.RequestPathPattern.TryGetContextualParameter(Microsoft.TypeSpec.Generator.Providers.ParameterProvider,Azure.Generator.Management.Models.ContextualParameter@)">
228
+ <member name="M:Azure.Generator.Management.Models.RequestPathPattern.GetMaximumSharingSegmentsCount(Azure.Generator.Management.Models.RequestPathPattern,Azure.Generator.Management.Models.RequestPathPattern)">
136
229
  <summary>
137
- Get the corresponding contextual parameter in this request path for a provided parameter.
230
+ Returns the number of shared segments between two <see cref="T:Azure.Generator.Management.Models.RequestPathPattern"/> instances,
231
+ starting from the beginning of the paths. Segments are considered shared if both are variable segments,
232
+ or if both are constant segments with equal values. The comparison stops at the first non-matching segment.
138
233
  </summary>
139
- <param name="parameter"></param>
140
- <param name="contextualParameter"></param>
141
- <returns></returns>
234
+ <param name="left">The first <see cref="T:Azure.Generator.Management.Models.RequestPathPattern"/> to compare.</param>
235
+ <param name="right">The second <see cref="T:Azure.Generator.Management.Models.RequestPathPattern"/> to compare.</param>
236
+ <returns>
237
+ The count of shared segments between the two paths.
238
+ </returns>
142
239
  </member>
143
240
  <member name="P:Azure.Generator.Management.Models.RequestPathSegment.Value">
144
241
  <summary>
@@ -162,6 +259,21 @@
162
259
  Returns true if this segment is the "providers" segment.
163
260
  </summary>
164
261
  </member>
262
+ <member name="T:Azure.Generator.Management.Models.ArmProviderSchema">
263
+ <summary>
264
+ Represents the unified ARM provider schema containing all resource metadata and non-resource methods.
265
+ This consolidates information previously scattered across @resourceSchema and @nonResourceMethodSchema decorators.
266
+ </summary>
267
+ </member>
268
+ <member name="M:Azure.Generator.Management.Models.ArmProviderSchema.Deserialize(System.Collections.Generic.IReadOnlyDictionary{System.String,System.BinaryData},Azure.Generator.Management.ManagementInputLibrary,System.Func{Azure.Generator.Management.Models.NonResourceMethod,System.Boolean})">
269
+ <summary>
270
+ Deserializes the ArmProviderSchema from decorator arguments.
271
+ </summary>
272
+ <param name="arguments">The decorator arguments containing resources and nonResourceMethods data</param>
273
+ <param name="library">The management input library containing models cache</param>
274
+ <param name="methodFilter">Optional predicate to filter non-resource methods</param>
275
+ <returns>A new ArmProviderSchema instance</returns>
276
+ </member>
165
277
  <member name="T:Azure.Generator.Management.Models.RestClientInfo">
166
278
  <summary>
167
279
  Record to combine client provider and related field providers
@@ -229,12 +341,12 @@
229
341
  Provider for building operation methods in resource clients.
230
342
  </summary>
231
343
  </member>
232
- <member name="M:Azure.Generator.Management.Providers.OperationMethodProviders.ResourceOperationMethodProvider.#ctor(Microsoft.TypeSpec.Generator.Providers.TypeProvider,Azure.Generator.Management.Models.RequestPathPattern,Azure.Generator.Management.Models.RestClientInfo,Microsoft.TypeSpec.Generator.Input.InputServiceMethod,System.Boolean,System.String,System.FormattableString,System.Boolean)">
344
+ <member name="M:Azure.Generator.Management.Providers.OperationMethodProviders.ResourceOperationMethodProvider.#ctor(Microsoft.TypeSpec.Generator.Providers.TypeProvider,Azure.Generator.Management.Models.OperationContext,Azure.Generator.Management.Models.RestClientInfo,Microsoft.TypeSpec.Generator.Input.InputServiceMethod,System.Boolean,System.String,System.FormattableString,System.Boolean)">
233
345
  <summary>
234
346
  Creates a new instance of <see cref="T:Azure.Generator.Management.Providers.OperationMethodProviders.ResourceOperationMethodProvider"/> which represents a method on a client
235
347
  </summary>
236
348
  <param name="enclosingType">The enclosing type of this operation. </param>
237
- <param name="contextualPath">The contextual path of the enclosing type. </param>
349
+ <param name="operationContext">The contextual path of the enclosing type. </param>
238
350
  <param name="restClientInfo">The rest client information containing the client provider and related fields. </param>
239
351
  <param name="method">The input service method that we are building from. </param>
240
352
  <param name="isAsync">Whether this method is an async method. </param>
@@ -258,7 +370,7 @@
258
370
  Provides a resource client type.
259
371
  </summary>
260
372
  </member>
261
- <member name="M:Azure.Generator.Management.Providers.ResourceCollectionClientProvider.GetContextualRequestPattern(Azure.Generator.Management.Models.ResourceMetadata)">
373
+ <member name="M:Azure.Generator.Management.Providers.ResourceCollectionClientProvider.GetContextualPath(Azure.Generator.Management.Models.ResourceMetadata)">
262
374
  <summary>
263
375
  Get the contextual request path pattern for this collection client.
264
376
  The contextual request path pattern for a collection should always be the request path pattern of the parent resource.
@@ -308,16 +420,6 @@
308
420
  </summary>
309
421
  <param name="enclosingType">The type provider to build the constructor for.</param>
310
422
  </member>
311
- <member name="M:Azure.Generator.Management.Utilities.ContextualParameterBuilder.BuildContextualParameters(Azure.Generator.Management.Models.RequestPathPattern)">
312
- <summary>
313
- This method accepts a <see cref="T:Azure.Generator.Management.Models.RequestPathPattern"/> as a contextual request path pattern
314
- of a certain resource or resource collection class,
315
- and builds a list of <see cref="T:Azure.Generator.Management.Models.ContextualParameter"/>s that represent the parameters
316
- provided by this contextual request path pattern.
317
- </summary>
318
- <param name="requestPathPattern">The contextual request path pattern.</param>
319
- <returns></returns>
320
- </member>
321
423
  <member name="M:Azure.Generator.Management.Utilities.ResourceHelpers.GetOperationMethodName(Azure.Generator.Management.Models.ResourceOperationKind,System.Boolean,System.Boolean)">
322
424
  <summary>
323
425
  Gets the appropriate method name for a resource operation based on its kind.
@@ -354,6 +456,21 @@
354
456
  <param name="serviceMethod">The input service method to construct the operation ID from.</param>
355
457
  <returns>The constructed operation ID string.</returns>
356
458
  </member>
459
+ <member name="M:Azure.Generator.Management.Utilities.ResourceHelpers.GetRequestPathParameterType(System.String,Microsoft.TypeSpec.Generator.Input.InputServiceMethod)">
460
+ <summary>
461
+ Gets the C# type for a request path parameter by its name from the given <see cref="T:Microsoft.TypeSpec.Generator.Input.InputServiceMethod"/>.
462
+ <para>
463
+ This method searches the operation's parameters for a path parameter matching <paramref name="parameterName"/> and returns its C# type.
464
+ If the parameter is not found, it defaults to <see cref="T:System.String"/> and emits a warning diagnostic.
465
+ </para>
466
+ <para>
467
+ For backward compatibility, if the parameter is named "subscriptionId" and its type is <see cref="T:System.Guid"/>, the method returns <see cref="T:System.String"/>.
468
+ </para>
469
+ </summary>
470
+ <param name="parameterName">The name of the path parameter to look up.</param>
471
+ <param name="inputMethod">The input service method containing the operation and its parameters.</param>
472
+ <returns>The resolved <see cref="T:Microsoft.TypeSpec.Generator.Primitives.CSharpType"/> for the specified parameter, or <see cref="T:System.String"/> if not found.</returns>
473
+ </member>
357
474
  <member name="M:Azure.Generator.Management.Utilities.ResourceHelpers.BuildEnhancedXmlDocs(Microsoft.TypeSpec.Generator.Input.InputServiceMethod,System.FormattableString,Microsoft.TypeSpec.Generator.Providers.TypeProvider,Microsoft.TypeSpec.Generator.Providers.XmlDocProvider)">
358
475
  <summary>
359
476
  Builds enhanced XML documentation with structured XmlDocStatement objects for proper XML rendering.
@@ -6,7 +6,7 @@
6
6
  "compilationOptions": {},
7
7
  "targets": {
8
8
  ".NETCoreApp,Version=v10.0": {
9
- "Azure.Generator.Management/1.0.0-alpha.20260113.1": {
9
+ "Azure.Generator.Management/1.0.0-alpha.20260115.2": {
10
10
  "dependencies": {
11
11
  "Azure.Core": "1.50.0",
12
12
  "Azure.Generator": "1.0.0-alpha.20260112.2",
@@ -622,7 +622,7 @@
622
622
  }
623
623
  },
624
624
  "libraries": {
625
- "Azure.Generator.Management/1.0.0-alpha.20260113.1": {
625
+ "Azure.Generator.Management/1.0.0-alpha.20260115.2": {
626
626
  "type": "project",
627
627
  "serviceable": false,
628
628
  "sha512": ""