@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.
- package/dist/emitter/lib/lib.d.ts +1 -1
- package/dist/emitter/lib/lib.d.ts.map +1 -1
- package/dist/emitter/lib/lib.js +11 -2
- package/dist/emitter/lib/lib.js.map +1 -1
- package/dist/emitter/resolve-arm-resources-converter.d.ts.map +1 -1
- package/dist/emitter/resolve-arm-resources-converter.js +39 -19
- package/dist/emitter/resolve-arm-resources-converter.js.map +1 -1
- package/dist/emitter/resource-detection.d.ts.map +1 -1
- package/dist/emitter/resource-detection.js +48 -27
- package/dist/emitter/resource-detection.js.map +1 -1
- package/dist/emitter/resource-metadata.d.ts.map +1 -1
- package/dist/emitter/resource-metadata.js +0 -4
- package/dist/emitter/resource-metadata.js.map +1 -1
- package/dist/emitter/sdk-context-options.d.ts.map +1 -1
- package/dist/emitter/sdk-context-options.js +1 -1
- package/dist/emitter/sdk-context-options.js.map +1 -1
- package/dist/emitter/utils.d.ts +21 -0
- package/dist/emitter/utils.d.ts.map +1 -0
- package/dist/emitter/utils.js +49 -0
- package/dist/emitter/utils.js.map +1 -0
- package/dist/generator/Azure.Generator.Management.deps.json +2 -2
- package/dist/generator/Azure.Generator.Management.dll +0 -0
- package/dist/generator/Azure.Generator.Management.pdb +0 -0
- package/dist/generator/Azure.Generator.Management.xml +146 -29
- package/dist/generator/net10.0/Azure.Generator.Management.deps.json +2 -2
- package/dist/generator/net10.0/Azure.Generator.Management.dll +0 -0
- package/dist/generator/net10.0/Azure.Generator.Management.pdb +0 -0
- package/dist/generator/net10.0/Azure.Generator.Management.xml +146 -29
- package/package.json +1 -1
|
@@ -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.
|
|
92
|
+
<member name="T:Azure.Generator.Management.Models.ContextualParameter">
|
|
93
93
|
<summary>
|
|
94
|
-
Represents
|
|
95
|
-
|
|
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.
|
|
153
|
+
<member name="M:Azure.Generator.Management.Models.OperationContext.BuildParameterMapping(Azure.Generator.Management.Models.RequestPathPattern)">
|
|
99
154
|
<summary>
|
|
100
|
-
|
|
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="
|
|
103
|
-
<
|
|
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.
|
|
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
|
-
|
|
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.
|
|
228
|
+
<member name="M:Azure.Generator.Management.Models.RequestPathPattern.GetMaximumSharingSegmentsCount(Azure.Generator.Management.Models.RequestPathPattern,Azure.Generator.Management.Models.RequestPathPattern)">
|
|
136
229
|
<summary>
|
|
137
|
-
|
|
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="
|
|
140
|
-
<param name="
|
|
141
|
-
<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.
|
|
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="
|
|
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.
|
|
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.
|
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.
|
|
3
|
+
"version": "1.0.0-alpha.20260115.2",
|
|
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",
|