@azure-tools/typespec-azure-resource-manager 0.32.0-dev.1 → 0.32.0-dev.10

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.
@@ -22,8 +22,8 @@ model ArmResource {
22
22
  @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}")
23
23
  @visibility("read")
24
24
  id: string;
25
- // The name property must be included by the resource type author!
26
25
 
26
+ // The name property must be included by the resource type author!
27
27
 
28
28
  @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"")
29
29
  @visibility("read")
@@ -43,6 +43,7 @@ model TrackedResourceBase extends ArmResource {
43
43
  @doc("The geo-location where the resource lives")
44
44
  @visibility("read", "create")
45
45
  location: string;
46
+
46
47
  ...ArmTagsProperty;
47
48
  }
48
49
 
@@ -203,12 +204,16 @@ model ErrorDetail {
203
204
  @resourceBaseParametersOf(TResource)
204
205
  model BaseParameters<TResource extends ArmResource> {
205
206
  ...ApiVersionParameter;
207
+
206
208
  // unless tenant or extension
207
209
  ...SubscriptionIdParameter;
210
+
208
211
  //unless tenant, subscription, resourceGroup, or extension
209
212
  ...LocationParameter;
213
+
210
214
  // unless tenant, subscription, location, or extension
211
215
  ...ResourceGroupParameter;
216
+
212
217
  // unless tenant, subscription, location, or resourceGroup
213
218
  ...ResourceUriParameter;
214
219
  }
@@ -681,5 +686,5 @@ op checkNameAvailability<
681
686
 
682
687
  @doc("The CheckAvailability request")
683
688
  @body
684
- body: TRequest
689
+ body: TRequest,
685
690
  ): TResponse | ErrorResponse;
@@ -26,7 +26,7 @@ interface Operations {
26
26
  @path
27
27
  @segment("providers")
28
28
  @doc("The provider namespace (this parameter will not show up in operations).")
29
- provider: "Microsoft.ThisWillBeReplaced"
29
+ provider: "Microsoft.ThisWillBeReplaced",
30
30
  ): ArmResponse<OperationListResult> | ErrorResponse;
31
31
  }
32
32
 
@@ -41,7 +41,6 @@ interface Operations {
41
41
  * @template TBaseParameters The http parameters that are part of the request
42
42
  *
43
43
  */
44
-
45
44
  @deprecated("Use Azure.ResourceManager.TrackedResourceOperations instead")
46
45
  interface ResourceOperations<
47
46
  TResource extends ArmResource,
@@ -59,7 +58,6 @@ interface ResourceOperations<
59
58
  * @template TBaseParameters The http parameters that are part of the request
60
59
  *
61
60
  */
62
-
63
61
  interface TrackedResourceOperations<
64
62
  TResource extends ArmResource,
65
63
  TProperties extends TypeSpec.Reflection.Model,
@@ -143,7 +141,7 @@ interface ResourceCollectionOperations<
143
141
  */
144
142
  interface ResourceListBySubscription<TResource extends ArmResource> {
145
143
  /**
146
- * List resources by subscription.
144
+ * @dev List resources by subscription.
147
145
  * @template TResource The ArmResource to list.
148
146
  */
149
147
  listBySubscription is ArmListBySubscription<TResource>;
@@ -163,7 +161,7 @@ interface ResourceListByParent<
163
161
  TParentFriendlyName extends valueof string = ""
164
162
  > {
165
163
  /**
166
- * List resources by parent.
164
+ * @dev List resources by parent.
167
165
  * @template TResource The ArmResource to list.
168
166
  * @template TBaseParameters The http parameters that are part of the request
169
167
  * @template TParentName The name of the parent resource
@@ -184,7 +182,7 @@ interface ResourceListByParent<
184
182
  */
185
183
  interface ResourceRead<TResource extends ArmResource, TBaseParameters = BaseParameters<TResource>> {
186
184
  /**
187
- * Retrieve a resource.
185
+ * @dev Retrieve a resource.
188
186
  * @template TResource The ArmResource to retrieve.
189
187
  * @template TBaseParameters The http parameters that are part of the request
190
188
  */
@@ -201,7 +199,7 @@ interface ResourceCreateSync<
201
199
  TBaseParameters = BaseParameters<TResource>
202
200
  > {
203
201
  /**
204
- * Create or update a resource using the synchronous call pattern.
202
+ * @dev Create or update a resource using the synchronous call pattern.
205
203
  * @template TResource The ArmResource to create or update.
206
204
  * @template TBaseParameters The http parameters that are part of the request
207
205
  */
@@ -218,7 +216,7 @@ interface ResourceCreateAsync<
218
216
  TBaseParameters = BaseParameters<TResource>
219
217
  > {
220
218
  /**
221
- * Create or update a resource using the asynchronous call pattern.
219
+ * @dev Create or update a resource using the asynchronous call pattern.
222
220
  * @template TResource The ArmResource to create or update.
223
221
  * @template TBaseParameters The http parameters that are part of the request
224
222
  */
@@ -226,7 +224,7 @@ interface ResourceCreateAsync<
226
224
  }
227
225
 
228
226
  /**
229
- * A composite interface for resources that include a long-running delete operation.
227
+ * @dev A composite interface for resources that include a long-running delete operation.
230
228
  * @template TResource The ArmResource that provides these operations
231
229
  * @template TBaseParameters The http parameters that are part of the request
232
230
  */
@@ -236,7 +234,7 @@ interface ResourceDeleteAsync<
236
234
  TBaseParameters = BaseParameters<TResource>
237
235
  > {
238
236
  /**
239
- * Delete a resource using the asynchronous call pattern.
237
+ * @dev Delete a resource using the asynchronous call pattern.
240
238
  * @template TResource The ArmResource to delete.
241
239
  * @template TBaseParameters The http parameters that are part of the request
242
240
  */
@@ -244,7 +242,7 @@ interface ResourceDeleteAsync<
244
242
  }
245
243
 
246
244
  /**
247
- * A composite interface for resources that include a synchronous delete operation.
245
+ * @dev A composite interface for resources that include a synchronous delete operation.
248
246
  * @template TResource The ArmResource that provides these operations
249
247
  * @template TBaseParameters The http parameters that are part of the request
250
248
  */
@@ -254,7 +252,7 @@ interface ResourceDeleteSync<
254
252
  TBaseParameters = BaseParameters<TResource>
255
253
  > {
256
254
  /**
257
- * Delete a resource using the synchronous call pattern.
255
+ * @dev Delete a resource using the synchronous call pattern.
258
256
  * @template TResource The ArmResource to delete.
259
257
  * @template TBaseParameters The http parameters that are part of the request
260
258
  */
@@ -262,7 +260,7 @@ interface ResourceDeleteSync<
262
260
  }
263
261
 
264
262
  /**
265
- * A composite interface for resources that include a long-running update operation.
263
+ * @dev A composite interface for resources that include a long-running update operation.
266
264
  * @template TResource The ArmResource that provides these operations
267
265
  * @template TProperties RP-specific property bag for the resource
268
266
  * @template TBaseParameters The http parameters that are part of the request
@@ -274,7 +272,7 @@ interface ResourceUpdateAsync<
274
272
  TBaseParameters = BaseParameters<TResource>
275
273
  > {
276
274
  /**
277
- * Update a resource using the asynchronous call pattern.
275
+ * @dev Update a resource using the asynchronous call pattern.
278
276
  * @template TResource The ArmResource to update.
279
277
  * @template TProperties RP-specific property bag for the resource
280
278
  * @template TBaseParameters The http parameters that are part of the request
@@ -299,7 +297,7 @@ interface ResourceUpdateSync<
299
297
  TBaseParameters = BaseParameters<TResource>
300
298
  > {
301
299
  /**
302
- * Update a resource using the synchronous call pattern.
300
+ * @dev Update a resource using the synchronous call pattern.
303
301
  * @template TResource The ArmResource to update.
304
302
  * @template TProperties RP-specific property bag for the resource
305
303
  * @template TBaseParameters The http parameters that are part of the request
@@ -14,12 +14,12 @@ namespace Azure.ResourceManager;
14
14
  */
15
15
  @autoRoute
16
16
  @doc("List {name} resources by subscription ID", TResource)
17
- @list(TResource)
17
+ @listsResource(TResource)
18
18
  @segmentOf(TResource)
19
19
  @armResourceList(TResource)
20
20
  @get
21
21
  op ArmListBySubscription<TResource extends ArmResource>(
22
- ...SubscriptionScope<TResource>
22
+ ...SubscriptionScope<TResource>,
23
23
  ): ArmResponse<ResourceListResult<TResource>> | ErrorResponse;
24
24
 
25
25
  /**
@@ -31,7 +31,7 @@ op ArmListBySubscription<TResource extends ArmResource>(
31
31
  */
32
32
  @get
33
33
  @autoRoute
34
- @list(TResource)
34
+ @listsResource(TResource)
35
35
  @segmentOf(TResource)
36
36
  @armRenameListByOperation(TResource, TParentName, TParentFriendlyName) // This must come before @armResourceList!
37
37
  @armResourceList(TResource)
@@ -41,7 +41,7 @@ op ArmResourceListByParent<
41
41
  TParentName extends valueof string = "",
42
42
  TParentFriendlyName extends valueof string = ""
43
43
  >(
44
- ...ResourceParentParameters<TResource, TBaseParameters>
44
+ ...ResourceParentParameters<TResource, TBaseParameters>,
45
45
  ): ArmResponse<ResourceListResult<TResource>> | ErrorResponse;
46
46
 
47
47
  /**
@@ -51,7 +51,7 @@ op ArmResourceListByParent<
51
51
  */
52
52
  @get
53
53
  @autoRoute
54
- @list(TResource)
54
+ @listsResource(TResource)
55
55
  @segmentOf(TResource)
56
56
  @armRenameListByOperation(TResource) // This must come before @armResourceList!
57
57
  @armResourceList(TResource)
@@ -59,7 +59,7 @@ op ArmResourceListAtScope<
59
59
  TResource extends ArmResource,
60
60
  TBaseParameters = BaseParameters<TResource>
61
61
  >(
62
- ...ResourceParentParameters<TResource, TBaseParameters>
62
+ ...ResourceParentParameters<TResource, TBaseParameters>,
63
63
  ): ArmResponse<ResourceListResult<TResource>> | ErrorResponse;
64
64
 
65
65
  /**
@@ -72,7 +72,7 @@ op ArmResourceListAtScope<
72
72
  @get
73
73
  @armResourceRead(TResource)
74
74
  op ArmResourceRead<TResource extends ArmResource, TBaseParameters = BaseParameters<TResource>>(
75
- ...ResourceInstanceParameters<TResource, TBaseParameters>
75
+ ...ResourceInstanceParameters<TResource, TBaseParameters>,
76
76
  ): ArmResponse<TResource> | ErrorResponse;
77
77
 
78
78
  /**
@@ -99,7 +99,7 @@ op ArmResourceCreateOrUpdateAsync<
99
99
 
100
100
  @doc("Resource create parameters.")
101
101
  @body
102
- resource: TResource
102
+ resource: TResource,
103
103
  ): ArmResponse<TResource> | ArmCreatedResponse<TResource> | ErrorResponse;
104
104
 
105
105
  /**
@@ -119,7 +119,7 @@ op ArmResourceCreateOrUpdateSync<
119
119
 
120
120
  @doc("Resource create parameters.")
121
121
  @body
122
- resource: TResource
122
+ resource: TResource,
123
123
  ): ArmResponse<TResource> | ErrorResponse;
124
124
 
125
125
  /**
@@ -171,7 +171,7 @@ op ArmCustomPatchAsync<
171
171
 
172
172
  @doc("The resource properties to be updated.")
173
173
  @body
174
- properties: TPatchModel
174
+ properties: TPatchModel,
175
175
  ): ArmResponse<TResource> | ArmAcceptedLroResponse<"Resource update request accepted."> | ErrorResponse;
176
176
 
177
177
  /**
@@ -215,7 +215,7 @@ op ArmCustomPatchSync<
215
215
 
216
216
  @doc("The resource properties to be updated.")
217
217
  @body
218
- properties: TPatchModel
218
+ properties: TPatchModel,
219
219
  ): ArmResponse<TResource> | ErrorResponse;
220
220
 
221
221
  /**
@@ -256,7 +256,7 @@ op ArmResourceDeleteSync<
256
256
  TResource extends ArmResource,
257
257
  TBaseParameters = BaseParameters<TResource>
258
258
  >(
259
- ...ResourceInstanceParameters<TResource, TBaseParameters>
259
+ ...ResourceInstanceParameters<TResource, TBaseParameters>,
260
260
  ): ArmDeletedResponse | ArmDeletedNoContentResponse | ErrorResponse;
261
261
 
262
262
  /**
@@ -286,7 +286,7 @@ op ArmResourceActionAsync<
286
286
 
287
287
  @doc("The content of the action request")
288
288
  @body
289
- body: TRequest
289
+ body: TRequest,
290
290
  ): ArmAcceptedLroResponse | ArmResponse<TResponse> | ErrorResponse;
291
291
 
292
292
  /**
@@ -309,7 +309,7 @@ op ArmResourceActionSync<
309
309
 
310
310
  @doc("The content of the action request")
311
311
  @body
312
- body: TRequest
312
+ body: TRequest,
313
313
  ): ArmResponse<TResponse> | ErrorResponse;
314
314
 
315
315
  /**
@@ -337,7 +337,7 @@ op ArmResourceActionNoContentAsync<
337
337
 
338
338
  @doc("The content of the action request")
339
339
  @body
340
- body: TRequest
340
+ body: TRequest,
341
341
  ): ArmAcceptedLroResponse | ArmNoContentResponse<"Action completed successfully."> | ErrorResponse;
342
342
 
343
343
  /**
@@ -358,7 +358,7 @@ op ArmResourceActionNoContentSync<
358
358
 
359
359
  @doc("The content of the action request")
360
360
  @body
361
- body: TRequest
361
+ body: TRequest,
362
362
  ): ArmNoContentResponse<"Action completed successfully."> | ErrorResponse;
363
363
 
364
364
  /**
@@ -44,14 +44,15 @@ model SubscriptionIdParameter {
44
44
  }
45
45
 
46
46
  /**
47
- * The default subscriptionId parameter type.
47
+ * The default location parameter type.
48
48
  */
49
- @doc("The default subscriptionId parameter type.")
49
+ @doc("The default location parameter type.")
50
50
  model LocationParameter {
51
51
  @path
52
52
  @minLength(1)
53
53
  @segment("locations")
54
54
  @doc("The location name.")
55
+ @armCommonParameter("LocationParameter")
55
56
  @resourceParameterBaseFor([ResourceHome.Location])
56
57
  location: string;
57
58
  }
package/lib/responses.tsp CHANGED
@@ -36,12 +36,12 @@ model ArmDeletedResponse {
36
36
  }
37
37
 
38
38
  /**
39
- * The response for asynchronous ARM delete ACCEPTED
39
+ * @dev The response for asynchronous ARM delete ACCEPTED
40
40
  */
41
41
  model ArmDeleteAcceptedLroResponse is ArmAcceptedLroResponse<"Resource deletion accepted.">;
42
42
 
43
43
  /**
44
- * The response for synchronous ARM delete ACCEPTED
44
+ * @dev The response for synchronous ARM delete ACCEPTED
45
45
  */
46
46
  model ArmDeleteAcceptedResponse is ArmAcceptedResponse<"Resource deletion accepted.">;
47
47
 
@@ -59,6 +59,7 @@ model ArmAcceptedResponse<TMessage extends valueof string = "Resource operation
59
59
  * The standard ARM response for asynchronous PATCH, POST, and DELETE operations
60
60
  * @template TMessage The description of the response status (defaults to `Resource operation accepted`)
61
61
  */
62
+ @doc(TMessage)
62
63
  model ArmAcceptedLroResponse<TMessage extends valueof string = "Resource operation accepted.">
63
64
  is ArmAcceptedResponse<TMessage> {
64
65
  @doc("The Location header contains the URL where the status of the long running operation can be checked.")
@@ -67,7 +68,7 @@ model ArmAcceptedLroResponse<TMessage extends valueof string = "Resource operati
67
68
  }
68
69
 
69
70
  /**
70
- * ARM response for a properly formed delete request, with no resource found
71
+ * @dev ARM response for a properly formed delete request, with no resource found
71
72
  */
72
73
  model ArmDeletedNoContentResponse is ArmNoContentResponse<"Resource deleted successfully.">;
73
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-resource-manager",
3
- "version": "0.32.0-dev.1",
3
+ "version": "0.32.0-dev.10",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Resource Manager library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -42,7 +42,7 @@
42
42
  "!dist/test/**"
43
43
  ],
44
44
  "peerDependencies": {
45
- "@typespec/compiler": "~0.45.0 || >=0.46.0-dev <0.46.0",
45
+ "@typespec/compiler": "~0.45.2 || >=0.46.0-dev <0.46.0",
46
46
  "@azure-tools/typespec-azure-core": "~0.31.0 || >=0.32.0-dev <0.32.0",
47
47
  "@azure-tools/typespec-autorest": "~0.31.0 || >=0.32.0-dev <0.32.0",
48
48
  "@typespec/openapi": "~0.45.0 || >=0.46.0-dev <0.46.0",
@@ -54,24 +54,24 @@
54
54
  "@typespec/lint": "~0.45.0 || >=0.46.0-dev <0.46.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@typespec/compiler": "~0.45.0 || >=0.46.0-dev <0.46.0",
57
+ "@typespec/compiler": "~0.45.2 || >=0.46.0-dev <0.46.0",
58
58
  "@typespec/openapi": "~0.45.0 || >=0.46.0-dev <0.46.0",
59
59
  "@azure-tools/typespec-azure-core": "~0.31.0 || >=0.32.0-dev <0.32.0",
60
60
  "@azure-tools/typespec-autorest": "~0.31.0 || >=0.32.0-dev <0.32.0",
61
61
  "@typespec/rest": "~0.45.0 || >=0.46.0-dev <0.46.0",
62
62
  "@typespec/http": "~0.45.0 || >=0.46.0-dev <0.46.0",
63
63
  "@typespec/versioning": "~0.45.0 || >=0.46.0-dev <0.46.0",
64
- "@types/mocha": "~10.0.0",
64
+ "@types/mocha": "~10.0.1",
65
65
  "@types/node": "~18.11.9",
66
66
  "@typespec/eslint-config-typespec": "~0.7.0 || >=0.8.0-dev <0.8.0",
67
67
  "@typespec/library-linter": "~0.45.0 || >=0.46.0-dev <0.46.0",
68
68
  "@typespec/eslint-plugin": "~0.45.0 || >=0.46.0-dev <0.46.0",
69
- "eslint": "^8.36.0",
69
+ "eslint": "^8.42.0",
70
70
  "mocha": "~10.2.0",
71
71
  "mocha-junit-reporter": "~2.2.0",
72
72
  "mocha-multi-reporters": "~1.5.1",
73
- "c8": "~7.14.0",
74
- "rimraf": "~5.0.0",
73
+ "c8": "~8.0.0",
74
+ "rimraf": "~5.0.1",
75
75
  "typescript": "~5.1.3"
76
76
  },
77
77
  "scripts": {