@azure-tools/typespec-azure-resource-manager 0.40.0-dev.7 → 0.40.0-dev.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -27
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +6 -1
- package/dist/src/linter.js.map +1 -1
- package/dist/src/rules/arm-delete-response-codes.d.ts +8 -0
- package/dist/src/rules/arm-delete-response-codes.d.ts.map +1 -0
- package/dist/src/rules/arm-delete-response-codes.js +41 -0
- package/dist/src/rules/arm-delete-response-codes.js.map +1 -0
- package/lib/interfaces.tsp +8 -0
- package/lib/operations.tsp +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,33 +28,34 @@ Available ruleSets:
|
|
|
28
28
|
|
|
29
29
|
### Rules
|
|
30
30
|
|
|
31
|
-
| Name
|
|
32
|
-
|
|
|
33
|
-
| [`@azure-tools/typespec-azure-resource-manager/arm-no-record`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-record)
|
|
34
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-common-types-version`
|
|
35
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-
|
|
36
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-
|
|
37
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-
|
|
38
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-
|
|
39
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-
|
|
40
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-
|
|
41
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-
|
|
42
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-
|
|
43
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
44
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
45
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
46
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
47
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
48
|
-
| `@azure-tools/typespec-azure-resource-manager/arm-resource-
|
|
49
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
50
|
-
|
|
|
51
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
52
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
53
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
54
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
55
|
-
| `@azure-tools/typespec-azure-resource-manager/resource-
|
|
56
|
-
| `@azure-tools/typespec-azure-resource-manager/
|
|
57
|
-
|
|
|
31
|
+
| Name | Description |
|
|
32
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
33
|
+
| [`@azure-tools/typespec-azure-resource-manager/arm-no-record`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-record) | Don't use Record types for ARM resources. |
|
|
34
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-common-types-version` | Specify the ARM common-types version using @armCommonTypesVersion. |
|
|
35
|
+
| [`@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/delete-operation-response-codes) | Ensure delete operations have the appropriate status codes. |
|
|
36
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment` | `@armResourceAction` should not be used with `@segment`. |
|
|
37
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property` | Warn about duplicate properties in resources. |
|
|
38
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property` | Check for invalid resource envelope properties. |
|
|
39
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format` | Check for valid versions. |
|
|
40
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars` | Arm resource key must contain only alphanumeric characters. |
|
|
41
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-operation-response` | [RPC 008]: PUT, GET, PATCH & LIST must return the same resource schema. |
|
|
42
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars` | Arm resource name must contain only alphanumeric characters. |
|
|
43
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state` | Check for properly configured provisioningState property. |
|
|
44
|
+
| `@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels` | Tracked Resources must use 3 or fewer levels of nesting. |
|
|
45
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-operation` | Validate ARM Resource operations. |
|
|
46
|
+
| `@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation` | Check for resources that must have a delete operation. |
|
|
47
|
+
| `@azure-tools/typespec-azure-resource-manager/empty-updateable-properties` | Should have updateable properties. |
|
|
48
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator` | Each resource interface must have an @armResourceOperations decorator. |
|
|
49
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb` | Actions must be HTTP Post operations. |
|
|
50
|
+
| `@azure-tools/typespec-azure-resource-manager/improper-subscription-list-operation` | Tenant and Extension resources should not define a list by subscription operation. |
|
|
51
|
+
| [`@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/missing-x-ms-identifiers) | Azure services should not use enums. |
|
|
52
|
+
| `@azure-tools/typespec-azure-resource-manager/no-response-body` | The body of 202 response should be empty. |
|
|
53
|
+
| `@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint` | Check for missing Operations interface. |
|
|
54
|
+
| `@azure-tools/typespec-azure-resource-manager/patch-envelope` | Patch envelope properties should match the resource properties. |
|
|
55
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-patch` | Validate ARM PATCH operations. |
|
|
56
|
+
| `@azure-tools/typespec-azure-resource-manager/resource-name` | Check the resource name. |
|
|
57
|
+
| `@azure-tools/typespec-azure-resource-manager/retry-after` | Check if retry-after header appears in response body. |
|
|
58
|
+
| [`@azure-tools/typespec-azure-resource-manager/unsupported-type`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/unsupported-type) | Check for unsupported ARM types. |
|
|
58
59
|
|
|
59
60
|
## Decorators
|
|
60
61
|
|
package/dist/src/linter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AA6DA,eAAO,MAAM,OAAO,+CAmBlB,CAAC"}
|
package/dist/src/linter.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineLinter } from "@typespec/compiler";
|
|
2
2
|
import { armCommonTypesVersionRule } from "./rules/arm-common-types-version.js";
|
|
3
|
+
import { armDeleteResponseCodesRule } from "./rules/arm-delete-response-codes.js";
|
|
3
4
|
import { armNoRecordRule } from "./rules/arm-no-record.js";
|
|
4
5
|
import { armResourceActionNoSegmentRule } from "./rules/arm-resource-action-no-segment.js";
|
|
5
6
|
import { armResourceDuplicatePropertiesRule } from "./rules/arm-resource-duplicate-property.js";
|
|
@@ -27,6 +28,7 @@ import { unsupportedTypeRule } from "./rules/unsupported-type.js";
|
|
|
27
28
|
const rules = [
|
|
28
29
|
armNoRecordRule,
|
|
29
30
|
armCommonTypesVersionRule,
|
|
31
|
+
armDeleteResponseCodesRule,
|
|
30
32
|
armResourceActionNoSegmentRule,
|
|
31
33
|
armResourceDuplicatePropertiesRule,
|
|
32
34
|
armResourceEnvelopeProperties,
|
|
@@ -56,6 +58,10 @@ export const $linter = defineLinter({
|
|
|
56
58
|
rules,
|
|
57
59
|
ruleSets: {
|
|
58
60
|
all: {
|
|
61
|
+
extends: [
|
|
62
|
+
"@azure-tools/typespec-azure-core/all",
|
|
63
|
+
"@azure-tools/typespec-azure-core/canonical-versioning",
|
|
64
|
+
],
|
|
59
65
|
enable: {
|
|
60
66
|
...allRulesEnabled,
|
|
61
67
|
// TODO: Enable this rule once azure-rest-api-specs repo is ready (issue #3839)
|
|
@@ -64,7 +70,6 @@ export const $linter = defineLinter({
|
|
|
64
70
|
disable: {
|
|
65
71
|
[`@azure-tools/typespec-azure-core/bad-record-type`]: "This clashes with the ARM `no-record` rule.",
|
|
66
72
|
},
|
|
67
|
-
extends: ["@azure-tools/typespec-azure-core/all"],
|
|
68
73
|
},
|
|
69
74
|
},
|
|
70
75
|
});
|
package/dist/src/linter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.js","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAClG,OAAO,EAAE,mCAAmC,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,gCAA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AAE;YACH,OAAO,EAAE;gBACP,sCAAsC;gBACtC,uDAAuD;aACxD;YACD,MAAM,EAAE;gBACN,GAAG,eAAe;gBAClB,+EAA+E;gBAC/E,CAAC,gDAAgD,yBAAyB,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK;aAC1F;YACD,OAAO,EAAE;gBACP,CAAC,kDAAkD,CAAC,EAClD,6CAA6C;aAChD;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verify that a delete operation only
|
|
3
|
+
*/
|
|
4
|
+
export declare const armDeleteResponseCodesRule: import("@typespec/compiler").LinterRuleDefinition<"arm-delete-operation-response-codes", {
|
|
5
|
+
readonly sync: "Synchronous delete operations must have 200, 204 and default responses. They must not have any other responses. Consider using the 'ArmResourceDeleteSync' template.";
|
|
6
|
+
readonly async: "Long-running delete operations must have 202, 204 and default responses. They must not have any other responses. Consider using the 'ArmResourceDeleteWithoutOkAsync' template.";
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=arm-delete-response-codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arm-delete-response-codes.d.ts","sourceRoot":"","sources":["../../../src/rules/arm-delete-response-codes.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;EAmCrC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createRule } from "@typespec/compiler";
|
|
2
|
+
import { getLroMetadata } from "@azure-tools/typespec-azure-core";
|
|
3
|
+
import { getHttpOperation } from "@typespec/http";
|
|
4
|
+
import { getArmResources } from "../resource.js";
|
|
5
|
+
/**
|
|
6
|
+
* Verify that a delete operation only
|
|
7
|
+
*/
|
|
8
|
+
export const armDeleteResponseCodesRule = createRule({
|
|
9
|
+
name: "arm-delete-operation-response-codes",
|
|
10
|
+
severity: "warning",
|
|
11
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/delete-operation-response-codes",
|
|
12
|
+
description: "Ensure delete operations have the appropriate status codes.",
|
|
13
|
+
messages: {
|
|
14
|
+
sync: `Synchronous delete operations must have 200, 204 and default responses. They must not have any other responses. Consider using the 'ArmResourceDeleteSync' template.`,
|
|
15
|
+
async: `Long-running delete operations must have 202, 204 and default responses. They must not have any other responses. Consider using the 'ArmResourceDeleteWithoutOkAsync' template.`,
|
|
16
|
+
},
|
|
17
|
+
create(context) {
|
|
18
|
+
return {
|
|
19
|
+
model: (model) => {
|
|
20
|
+
const resources = getArmResources(context.program);
|
|
21
|
+
const armResource = resources.find((re) => re.typespecType === model);
|
|
22
|
+
if (armResource && armResource.operations.lifecycle.delete) {
|
|
23
|
+
const deleteOperation = armResource.operations.lifecycle.delete;
|
|
24
|
+
const isAsync = getLroMetadata(context.program, deleteOperation.operation) !== undefined;
|
|
25
|
+
const [httpOp, _] = getHttpOperation(context.program, deleteOperation.operation);
|
|
26
|
+
const statusCodes = new Set([...httpOp.responses.map((r) => r.statusCodes.toString())]);
|
|
27
|
+
const expected = new Set(["204", "*"]);
|
|
28
|
+
expected.add(isAsync ? "202" : "200");
|
|
29
|
+
if (statusCodes.size !== expected.size ||
|
|
30
|
+
![...statusCodes].every((v) => expected.has(v))) {
|
|
31
|
+
context.reportDiagnostic({
|
|
32
|
+
target: deleteOperation.operation,
|
|
33
|
+
messageId: isAsync ? "async" : "sync",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=arm-delete-response-codes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arm-delete-response-codes.js","sourceRoot":"","sources":["../../../src/rules/arm-delete-response-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAA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AAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;oBACvC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBAEtC,IACE,WAAW,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI;wBAClC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAC/C,CAAC;wBACD,OAAO,CAAC,gBAAgB,CAAC;4BACvB,MAAM,EAAE,eAAe,CAAC,SAAS;4BACjC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;yBACtC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/lib/interfaces.tsp
CHANGED
|
@@ -77,6 +77,7 @@ interface TrackedResourceOperations<
|
|
|
77
77
|
* @template Resource the ArmResource that provides these operations
|
|
78
78
|
* @template BaseParameters The http parameters that are part of the request
|
|
79
79
|
*/
|
|
80
|
+
#suppress "deprecated" "This should be deprecated in a future release"
|
|
80
81
|
interface ProxyResourceOperations<
|
|
81
82
|
Resource extends ArmResource,
|
|
82
83
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
@@ -97,6 +98,7 @@ interface ProxyResourceOperations<
|
|
|
97
98
|
* @template Resource the ArmResource that provides these operations
|
|
98
99
|
* @template Properties RP-specific property bag for the resource
|
|
99
100
|
*/
|
|
101
|
+
#suppress "deprecated" "This should be deprecated in a future release"
|
|
100
102
|
interface TenantResourceOperations<
|
|
101
103
|
Resource extends ArmResource,
|
|
102
104
|
Properties extends TypeSpec.Reflection.Model
|
|
@@ -114,6 +116,7 @@ interface TenantResourceOperations<
|
|
|
114
116
|
* @template BaseParameters The http parameters that are part of the request
|
|
115
117
|
* @template PatchModel The model used for PATCH operations
|
|
116
118
|
*/
|
|
119
|
+
#suppress "deprecated" "This should be deprecated in a future release"
|
|
117
120
|
interface ResourceInstanceOperations<
|
|
118
121
|
Resource extends ArmResource,
|
|
119
122
|
Properties extends TypeSpec.Reflection.Model,
|
|
@@ -227,6 +230,7 @@ interface ResourceCreateAsync<
|
|
|
227
230
|
* @template Resource The ArmResource that provides these operations
|
|
228
231
|
* @template BaseParameters The http parameters that are part of the request
|
|
229
232
|
*/
|
|
233
|
+
#deprecated "This should be deprecated in a future release"
|
|
230
234
|
@doc("Delete a resource using the asynchronous call pattern")
|
|
231
235
|
interface ResourceDeleteAsync<
|
|
232
236
|
Resource extends ArmResource,
|
|
@@ -327,6 +331,7 @@ interface ResourceUpdateSync<
|
|
|
327
331
|
* @template Resource The ArmResource that provides these operations
|
|
328
332
|
* @template Properties RP-specific property bag for the resource
|
|
329
333
|
*/
|
|
334
|
+
#suppress "deprecated" "This should be deprecated in a future release"
|
|
330
335
|
interface ExtensionResourceInstanceOperations<
|
|
331
336
|
Resource extends ArmResource,
|
|
332
337
|
Properties extends TypeSpec.Reflection.Model
|
|
@@ -366,6 +371,7 @@ alias ResourceUpdate<
|
|
|
366
371
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
367
372
|
> = ResourceUpdateSync<Resource, Properties, BaseParameters>;
|
|
368
373
|
|
|
374
|
+
#suppress "deprecated" "This should be deprecated in a future release"
|
|
369
375
|
alias ResourceDelete<
|
|
370
376
|
Resource extends ArmResource,
|
|
371
377
|
BaseParameters = DefaultBaseParameters<Resource>
|
|
@@ -391,6 +397,7 @@ alias ExtensionResourceUpdate<
|
|
|
391
397
|
Properties extends TypeSpec.Reflection.Model
|
|
392
398
|
> = ResourceUpdate<Resource, Properties, ExtensionBaseParameters>;
|
|
393
399
|
|
|
400
|
+
#suppress "deprecated" "This should be deprecated in a future release"
|
|
394
401
|
alias ExtensionResourceDelete<Resource extends ArmResource> = ResourceDelete<
|
|
395
402
|
Resource,
|
|
396
403
|
ExtensionBaseParameters
|
|
@@ -413,6 +420,7 @@ alias TenantResourceCreate<Resource extends ArmResource> = ResourceCreateAsync<
|
|
|
413
420
|
TenantBaseParameters
|
|
414
421
|
>;
|
|
415
422
|
|
|
423
|
+
#suppress "deprecated" "This should be deprecated in a future release"
|
|
416
424
|
alias TenantResourceDelete<Resource extends ArmResource> = ResourceDelete<
|
|
417
425
|
Resource,
|
|
418
426
|
TenantBaseParameters
|
package/lib/operations.tsp
CHANGED
|
@@ -412,6 +412,7 @@ op ArmResourceDeleteAsyncBase<
|
|
|
412
412
|
* @template Response Optional. The success response(s) for the delete operation
|
|
413
413
|
* @template Error Optional. The error response, if non-standard.
|
|
414
414
|
*/
|
|
415
|
+
#deprecated "Use 'ArmResourceDeleteWithoutOkAsync' instead"
|
|
415
416
|
op ArmResourceDeleteAsync<
|
|
416
417
|
Resource extends ArmResource,
|
|
417
418
|
BaseParameters = DefaultBaseParameters<Resource>,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.40.0-dev.
|
|
3
|
+
"version": "0.40.0-dev.9",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|