@azure-tools/typespec-azure-resource-manager 0.47.0-dev.0 → 0.47.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.
- package/README.md +1 -0
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +2 -0
- package/dist/src/linter.js.map +1 -1
- package/dist/src/operations.d.ts.map +1 -1
- package/dist/src/operations.js +5 -1
- package/dist/src/operations.js.map +1 -1
- package/dist/src/rules/missing-x-ms-identifiers.js +1 -1
- package/dist/src/rules/missing-x-ms-identifiers.js.map +1 -1
- package/dist/src/rules/no-empty-model.d.ts +5 -0
- package/dist/src/rules/no-empty-model.d.ts.map +1 -0
- package/dist/src/rules/no-empty-model.js +24 -0
- package/dist/src/rules/no-empty-model.js.map +1 -0
- package/lib/common-types/common-types.tsp +3 -1
- package/lib/common-types/managed-identity-with-delegation-ref.tsp +28 -0
- package/lib/common-types/managed-identity-with-delegation.tsp +32 -0
- package/lib/common-types/managed-identity.tsp +7 -11
- package/lib/common-types/mobo-ref.tsp +18 -0
- package/lib/common-types/network-security-perimeter-ref.tsp +117 -0
- package/lib/common-types/network-security-perimeter.tsp +256 -0
- package/lib/common-types/types.tsp +1 -2
- package/lib/parameters.tsp +1 -2
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ Available ruleSets:
|
|
|
60
60
|
| `@azure-tools/typespec-azure-resource-manager/resource-name` | Check the resource name. |
|
|
61
61
|
| `@azure-tools/typespec-azure-resource-manager/retry-after` | Check if retry-after header appears in response body. |
|
|
62
62
|
| [`@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. |
|
|
63
|
+
| [`@azure-tools/typespec-azure-resource-manager/no-empty-model`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-empty-model) | ARM Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience. |
|
|
63
64
|
|
|
64
65
|
## Decorators
|
|
65
66
|
|
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":"AAmEA,eAAO,MAAM,OAAO,+CAElB,CAAC"}
|
package/dist/src/linter.js
CHANGED
|
@@ -23,6 +23,7 @@ import { envelopePropertiesRules } from "./rules/envelope-properties.js";
|
|
|
23
23
|
import { listBySubscriptionRule } from "./rules/list-operation.js";
|
|
24
24
|
import { lroLocationHeaderRule } from "./rules/lro-location-header.js";
|
|
25
25
|
import { missingXmsIdentifiersRule } from "./rules/missing-x-ms-identifiers.js";
|
|
26
|
+
import { noEmptyModel } from "./rules/no-empty-model.js";
|
|
26
27
|
import { noResponseBodyRule } from "./rules/no-response-body.js";
|
|
27
28
|
import { operationsInterfaceMissingRule } from "./rules/operations-interface-missing.js";
|
|
28
29
|
import { patchEnvelopePropertiesRules } from "./rules/patch-envelope-properties.js";
|
|
@@ -60,6 +61,7 @@ const rules = [
|
|
|
60
61
|
resourceNameRule,
|
|
61
62
|
retryAfterRule,
|
|
62
63
|
unsupportedTypeRule,
|
|
64
|
+
noEmptyModel,
|
|
63
65
|
];
|
|
64
66
|
export const $linter = defineLinter({
|
|
65
67
|
rules,
|
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,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,eAAe,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K,GAAG;IACZ,eAAe;IACf,yBAAyB;IACzB,0BAA0B;IAC1B,uBAAuB;IACvB,wBAAwB;IACxB,8BAA8B;IAC9B,kCAAkC;IAClC,6BAA6B;IAC7B,mCAAmC;IACnC,8BAA8B;IAC9B,0BAA0B;IAC1B,yBAAyB;IACzB,+BAA+B;IAC/B,gCAAgC;IAChC,iBAAiB;IACjB,kBAAkB;IAClB,0BAA0B;IAC1B,uBAAuB;IACvB,cAAc;IACd,qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;IACrB,yBAAyB;IACzB,kBAAkB;IAClB,8BAA8B;IAC9B,4BAA4B;IAC5B,mBAAmB;IACnB,gBAAgB;IAChB,cAAc;IACd,mBAAmB;IACnB,YAAY;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAClC,KAAK;CACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAGhB,KAAK,EACL,SAAS,EACT,OAAO,EACR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAoB,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAGhB,KAAK,EACL,SAAS,EACT,OAAO,EACR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAoB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAWjE,OAAO,EACL,0BAA0B,EAC1B,oCAAoC,EACpC,kCAAkC,EAClC,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,4CAA4C,CAAC;AAWpD,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACxF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AC/B,oBAAoB,CAAC,EAAE,OAAO,QAoD/B;AA6BD,eAAO,MAAM,kBAAkB,EAAE,0BA6BhC,CAAC;AASF,eAAO,MAAM,4BAA4B,EAAE,oCAK1C,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAElF"}
|
package/dist/src/operations.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $doc, getFriendlyName, ignoreDiagnostics, } from "@typespec/compiler";
|
|
2
2
|
import { getHttpOperation } from "@typespec/http";
|
|
3
|
-
import { $actionSegment, getActionSegment, getParentResource, getSegment } from "@typespec/rest";
|
|
3
|
+
import { $actionSegment, $createsOrReplacesResource, $deletesResource, $readsResource, $updatesResource, getActionSegment, getParentResource, getSegment, } from "@typespec/rest";
|
|
4
4
|
import { reportDiagnostic } from "./lib.js";
|
|
5
5
|
import { isArmLibraryNamespace } from "./namespace.js";
|
|
6
6
|
import { getArmResourceInfo, getResourceBaseType, isArmVirtualResource, ResourceBaseType, } from "./resource.js";
|
|
@@ -51,15 +51,19 @@ function setResourceLifecycleOperation(context, target, resourceType, kind, deco
|
|
|
51
51
|
operations.lifecycle[kind] = operation;
|
|
52
52
|
}
|
|
53
53
|
export const $armResourceRead = (context, target, resourceType) => {
|
|
54
|
+
context.call($readsResource, target, resourceType);
|
|
54
55
|
setResourceLifecycleOperation(context, target, resourceType, "read", "@armResourceRead");
|
|
55
56
|
};
|
|
56
57
|
export const $armResourceCreateOrUpdate = (context, target, resourceType) => {
|
|
58
|
+
context.call($createsOrReplacesResource, target, resourceType);
|
|
57
59
|
setResourceLifecycleOperation(context, target, resourceType, "createOrUpdate", "@armResourceCreateOrUpdate");
|
|
58
60
|
};
|
|
59
61
|
export const $armResourceUpdate = (context, target, resourceType) => {
|
|
62
|
+
context.call($updatesResource, target, resourceType);
|
|
60
63
|
setResourceLifecycleOperation(context, target, resourceType, "update", "@armResourceUpdate");
|
|
61
64
|
};
|
|
62
65
|
export const $armResourceDelete = (context, target, resourceType) => {
|
|
66
|
+
context.call($deletesResource, target, resourceType);
|
|
63
67
|
setResourceLifecycleOperation(context, target, resourceType, "delete", "@armResourceDelete");
|
|
64
68
|
};
|
|
65
69
|
export const $armResourceList = (context, target, resourceType) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAEJ,eAAe,EACf,iBAAiB,GAIlB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAiB,MAAM,gBAAgB,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAEJ,eAAe,EACf,iBAAiB,GAIlB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAiB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,GACX,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA2C1C,SAAS,wBAAwB,CAC/B,OAAgB,EAChB,YAAmB;IAEnB,IAAI,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACxF,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB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C;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAyC,CAChF,OAAyB,EACzB,MAAiB,EACjB,EAAE;IACF,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACvF,CAAC,CAAC;AAEF,MAAM,UAAU,qBAAqB,CAAC,OAAgB,EAAE,MAAiB;IACvE,OAAO,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;AACzF,CAAC"}
|
|
@@ -42,7 +42,7 @@ export const missingXmsIdentifiersRule = createRule({
|
|
|
42
42
|
if (Array.isArray(xmsIdentifiers)) {
|
|
43
43
|
for (const prop of xmsIdentifiers) {
|
|
44
44
|
if (typeof prop === "string") {
|
|
45
|
-
if (
|
|
45
|
+
if (getProperty(elementType, prop) === undefined) {
|
|
46
46
|
context.reportDiagnostic({
|
|
47
47
|
messageId: "missingProperty",
|
|
48
48
|
format: { propertyName: prop, targetModelName: elementType.name },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"missing-x-ms-identifiers.js","sourceRoot":"","sources":["../../../src/rules/missing-x-ms-identifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC;IAClD,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,uPAAuP;IACpQ,QAAQ,EAAE,SAAS;IACnB,GAAG,EAAE,6GAA6G;IAClH,QAAQ,EAAE;QACR,OAAO,EAAE,mPAAmP;QAC5P,QAAQ,EAAE,YAAY,CA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oBACrB,MAAM,EAAE,EAAE,SAAS,EAAE,OAAO,cAAc,EAAE;oBAC5C,MAAM,EAAE,QAAQ;iBACjB,CAAC,CAAC;YACL,CAAC;YAED,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const noEmptyModel: import("@typespec/compiler").LinterRuleDefinition<"no-empty-model", {
|
|
2
|
+
readonly default: "Properties with type:object must have definition of a reference model.";
|
|
3
|
+
readonly extends: "The `type:object` model is not defined in the payload. Define the reference model of the object or change the `type` to a primitive data type like string, int, etc";
|
|
4
|
+
}>;
|
|
5
|
+
//# sourceMappingURL=no-empty-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-empty-model.d.ts","sourceRoot":"","sources":["../../../src/rules/no-empty-model.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;EAuBvB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createRule } from "@typespec/compiler";
|
|
2
|
+
export const noEmptyModel = createRule({
|
|
3
|
+
name: "no-empty-model",
|
|
4
|
+
severity: "warning",
|
|
5
|
+
description: "ARM Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience.",
|
|
6
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-empty-model",
|
|
7
|
+
messages: {
|
|
8
|
+
default: "Properties with type:object must have definition of a reference model.",
|
|
9
|
+
extends: "The `type:object` model is not defined in the payload. Define the reference model of the object or change the `type` to a primitive data type like string, int, etc",
|
|
10
|
+
},
|
|
11
|
+
create(context) {
|
|
12
|
+
return {
|
|
13
|
+
model: (model) => {
|
|
14
|
+
if (model.properties.size === 0) {
|
|
15
|
+
context.reportDiagnostic({
|
|
16
|
+
code: "no-empty-model",
|
|
17
|
+
target: model,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=no-empty-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-empty-model.js","sourceRoot":"","sources":["../../../src/rules/no-empty-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAS,MAAM,oBAAoB,CAAC;AAEvD,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,+KAA+K;IACjL,GAAG,EAAE,mGAAmG;IACxG,QAAQ,EAAE;QACR,OAAO,EAAE,wEAAwE;QACjF,OAAO,EACL,qKAAqK;KACxK;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE;gBACtB,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;oBAChC,OAAO,CAAC,gBAAgB,CAAC;wBACvB,IAAI,EAAE,gBAAgB;wBACtB,MAAM,EAAE,KAAK;qBACd,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -3,12 +3,14 @@ import "@azure-tools/typespec-azure-core";
|
|
|
3
3
|
import "./common-types.tsp";
|
|
4
4
|
import "./types-ref.tsp";
|
|
5
5
|
import "./managed-identity-ref.tsp";
|
|
6
|
+
import "./managed-identity-with-delegation-ref.tsp";
|
|
6
7
|
import "./private-links-ref.tsp";
|
|
7
8
|
import "./customer-managed-keys-ref.tsp";
|
|
8
9
|
import "./extended-location-ref.tsp";
|
|
9
10
|
import "./internal.tsp";
|
|
10
11
|
import "./commontypes.private.decorators.tsp";
|
|
11
12
|
import "./versions.tsp";
|
|
12
|
-
import "./mobo.tsp";
|
|
13
|
+
import "./mobo-ref.tsp";
|
|
14
|
+
import "./network-security-perimeter-ref.tsp";
|
|
13
15
|
|
|
14
16
|
namespace Azure.ResourceManager.CommonTypes;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "./managed-identity-with-delegation.tsp";
|
|
2
|
+
using Azure.ResourceManager.CommonTypes.Private;
|
|
3
|
+
|
|
4
|
+
namespace Azure.ResourceManager.CommonTypes;
|
|
5
|
+
|
|
6
|
+
/** Managed service identity (system assigned and/or user assigned identities and/or delegated identities) - internal use only. */
|
|
7
|
+
@@armCommonDefinition(ManagedServiceIdentityWithDelegation,
|
|
8
|
+
"ManagedServiceIdentityWithDelegation",
|
|
9
|
+
Azure.ResourceManager.CommonTypes.Versions.v4,
|
|
10
|
+
"managedidentitywithdelegation.json"
|
|
11
|
+
);
|
|
12
|
+
@@armCommonDefinition(ManagedServiceIdentityWithDelegation,
|
|
13
|
+
"ManagedServiceIdentityWithDelegation",
|
|
14
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
15
|
+
"managedidentitywithdelegation.json"
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
/** Delegated resource properties - internal use only. */
|
|
19
|
+
@@armCommonDefinition(DelegatedResource,
|
|
20
|
+
"DelegatedResource",
|
|
21
|
+
Azure.ResourceManager.CommonTypes.Versions.v4,
|
|
22
|
+
"managedidentitywithdelegation.json"
|
|
23
|
+
);
|
|
24
|
+
@@armCommonDefinition(DelegatedResource,
|
|
25
|
+
"DelegatedResource",
|
|
26
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
27
|
+
"managedidentitywithdelegation.json"
|
|
28
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
using Azure.Core;
|
|
2
|
+
using TypeSpec.Versioning;
|
|
3
|
+
|
|
4
|
+
namespace Azure.ResourceManager.CommonTypes;
|
|
5
|
+
|
|
6
|
+
/** Managed service identity (system assigned and/or user assigned identities and/or delegated identities) - internal use only. */
|
|
7
|
+
@added(Versions.v4)
|
|
8
|
+
model ManagedServiceIdentityWithDelegation extends ManagedServiceIdentity {
|
|
9
|
+
delegatedResources?: DelegatedResources;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** The set of delegated resources. The delegated resources dictionary keys will be source resource internal ids - internal use only. */
|
|
13
|
+
@added(Versions.v4)
|
|
14
|
+
model DelegatedResources {
|
|
15
|
+
...Record<DelegatedResource>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Delegated resource properties - internal use only. */
|
|
19
|
+
@added(Versions.v4)
|
|
20
|
+
model DelegatedResource {
|
|
21
|
+
/** The ARM resource id of the delegated resource - internal use only. */
|
|
22
|
+
resourceId?: string;
|
|
23
|
+
|
|
24
|
+
/** The tenant id of the delegated resource - internal use only. */
|
|
25
|
+
tenantId?: uuid;
|
|
26
|
+
|
|
27
|
+
/** The delegation id of the referral delegation (optional) - internal use only. */
|
|
28
|
+
referralResource?: string;
|
|
29
|
+
|
|
30
|
+
/** The source resource location - internal use only. */
|
|
31
|
+
location?: string;
|
|
32
|
+
}
|
|
@@ -61,28 +61,24 @@ model UserAssignedIdentity {
|
|
|
61
61
|
*/
|
|
62
62
|
union ManagedServiceIdentityType {
|
|
63
63
|
/** No managed identity. */
|
|
64
|
-
|
|
64
|
+
"None",
|
|
65
65
|
|
|
66
66
|
/** System assigned managed identity. */
|
|
67
|
-
|
|
67
|
+
"SystemAssigned",
|
|
68
68
|
|
|
69
69
|
/** User assigned managed identity. */
|
|
70
|
-
|
|
70
|
+
"UserAssigned",
|
|
71
71
|
|
|
72
72
|
/** System and user assigned managed identity. */
|
|
73
|
-
@
|
|
73
|
+
@added(Versions.v3)
|
|
74
74
|
@removed(Versions.v4)
|
|
75
|
-
|
|
75
|
+
@added(Versions.v5)
|
|
76
|
+
"SystemAssigned,UserAssigned",
|
|
76
77
|
|
|
77
78
|
/** System and user assigned managed identity. */
|
|
78
79
|
@added(Versions.v4)
|
|
79
|
-
@renamedFrom(Versions.v4, "SystemAndUserAssigned")
|
|
80
80
|
@removed(Versions.v5)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/** System and user assigned managed identity. */
|
|
84
|
-
@added(Versions.v5)
|
|
85
|
-
SystemAndUserAssigned: "SystemAssigned,UserAssigned",
|
|
81
|
+
"SystemAssigned, UserAssigned",
|
|
86
82
|
|
|
87
83
|
string,
|
|
88
84
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "./mobo.tsp";
|
|
2
|
+
using Azure.ResourceManager.CommonTypes.Private;
|
|
3
|
+
|
|
4
|
+
namespace Azure.ResourceManager.CommonTypes;
|
|
5
|
+
|
|
6
|
+
/** This configuration exists for the resources where a resource provider manages those resources on behalf of the resource owner. */
|
|
7
|
+
@@armCommonDefinition(ManagedOnBehalfOfConfiguration,
|
|
8
|
+
"ManagedOnBehalfOfConfiguration",
|
|
9
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
10
|
+
"mobo.json"
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
/** This resource is created by the Resource Provider to manage some resources on behalf of the user. */
|
|
14
|
+
@@armCommonDefinition(MoboBrokerResource,
|
|
15
|
+
"MoboBrokerResource",
|
|
16
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
17
|
+
"mobo.json"
|
|
18
|
+
);
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import "./network-security-perimeter.tsp";
|
|
2
|
+
|
|
3
|
+
using Azure.ResourceManager.CommonTypes.Private;
|
|
4
|
+
|
|
5
|
+
namespace Azure.ResourceManager.CommonTypes;
|
|
6
|
+
|
|
7
|
+
/** Direction of Access Rule */
|
|
8
|
+
@@armCommonDefinition(AccessRuleDirection,
|
|
9
|
+
"AccessRuleDirection",
|
|
10
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
11
|
+
"networksecurityperimeter.json"
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
/** Provisioning state of a network security perimeter configuration that is being created or updated. */
|
|
15
|
+
@@armCommonDefinition(NetworkSecurityPerimeterConfigurationProvisioningState,
|
|
16
|
+
"NetworkSecurityPerimeterConfigurationProvisioningState",
|
|
17
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
18
|
+
"networksecurityperimeter.json"
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
/** Type of issue */
|
|
22
|
+
@@armCommonDefinition(IssueType,
|
|
23
|
+
"IssueType",
|
|
24
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
25
|
+
"networksecurityperimeter.json"
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
/** Severity of the issue. */
|
|
29
|
+
@@armCommonDefinition(Severity,
|
|
30
|
+
"Severity",
|
|
31
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
32
|
+
"networksecurityperimeter.json"
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/** Access mode of the resource association */
|
|
36
|
+
@@armCommonDefinition(ResourceAssociationAccessMode,
|
|
37
|
+
"ResourceAssociationAccessMode",
|
|
38
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
39
|
+
"networksecurityperimeter.json"
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
/** Allow, disallow, or let network security perimeter configuration control public network access to the protected resource. */
|
|
43
|
+
@@armCommonDefinition(PublicNetworkAccess,
|
|
44
|
+
"PublicNetworkAccess",
|
|
45
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
46
|
+
"networksecurityperimeter.json"
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
/** Access rule in a network security perimeter configuration profile */
|
|
50
|
+
@@armCommonDefinition(AccessRule,
|
|
51
|
+
"AccessRule",
|
|
52
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
53
|
+
"networksecurityperimeter.json"
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
/** Properties of Access Rule */
|
|
57
|
+
@@armCommonDefinition(AccessRuleDirection,
|
|
58
|
+
"AccessRuleDirection",
|
|
59
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
60
|
+
"networksecurityperimeter.json"
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
/** Information about a network security perimeter */
|
|
64
|
+
@@armCommonDefinition(NetworkSecurityPerimeter,
|
|
65
|
+
"NetworkSecurityPerimeter",
|
|
66
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
67
|
+
"networksecurityperimeter.json"
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
/** Network security perimeter configuration resource */
|
|
71
|
+
@@armCommonDefinition(NetworkSecurityPerimeterConfiguration,
|
|
72
|
+
"NetworkSecurityPerimeterConfiguration",
|
|
73
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
74
|
+
"networksecurityperimeter.json"
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
/** Network security configuration properties. */
|
|
78
|
+
@@armCommonDefinition(NetworkSecurityPerimeterConfigurationProperties,
|
|
79
|
+
"NetworkSecurityPerimeterConfigurationProperties",
|
|
80
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
81
|
+
"networksecurityperimeter.json"
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
/** Describes a provisioning issue for a network security perimeter configuration */
|
|
85
|
+
@@armCommonDefinition(ProvisioningIssue,
|
|
86
|
+
"ProvisioningIssue",
|
|
87
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
88
|
+
"networksecurityperimeter.json"
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
/** Details of a provisioning issue for a network security perimeter configuration. */
|
|
92
|
+
@@armCommonDefinition(ProvisioningIssueProperties,
|
|
93
|
+
"ProvisioningIssueProperties",
|
|
94
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
95
|
+
"networksecurityperimeter.json"
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
/** Information about resource association */
|
|
99
|
+
@@armCommonDefinition(ResourceAssociation,
|
|
100
|
+
"ResourceAssociation",
|
|
101
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
102
|
+
"networksecurityperimeter.json"
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
/** Network security perimeter configuration profile */
|
|
106
|
+
@@armCommonDefinition(NetworkSecurityProfile,
|
|
107
|
+
"NetworkSecurityProfile",
|
|
108
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
109
|
+
"networksecurityperimeter.json"
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
/** Result of a list NSP (network security perimeter) configurations request. */
|
|
113
|
+
@@armCommonDefinition(NetworkSecurityPerimeterConfigurationListResult,
|
|
114
|
+
"NetworkSecurityPerimeterConfigurationListResult",
|
|
115
|
+
Azure.ResourceManager.CommonTypes.Versions.v5,
|
|
116
|
+
"networksecurityperimeter.json"
|
|
117
|
+
);
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
using TypeSpec.Http;
|
|
2
|
+
using TypeSpec.Versioning;
|
|
3
|
+
using Azure.Core;
|
|
4
|
+
|
|
5
|
+
@server(
|
|
6
|
+
"https://management.azure.com",
|
|
7
|
+
"The endpoint for network security perimeter common type definitions"
|
|
8
|
+
)
|
|
9
|
+
namespace Azure.ResourceManager.CommonTypes;
|
|
10
|
+
|
|
11
|
+
/** Direction of Access Rule */
|
|
12
|
+
@added(Versions.v5)
|
|
13
|
+
union AccessRuleDirection {
|
|
14
|
+
string,
|
|
15
|
+
|
|
16
|
+
/** Applies to inbound network traffic to the secured resources. */
|
|
17
|
+
Inbound: "Inbound",
|
|
18
|
+
|
|
19
|
+
/** Applies to outbound network traffic from the secured resources */
|
|
20
|
+
Outbound: "Outbound",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Provisioning state of a network security perimeter configuration that is being created or updated. */
|
|
24
|
+
@added(Versions.v5)
|
|
25
|
+
union NetworkSecurityPerimeterConfigurationProvisioningState {
|
|
26
|
+
string,
|
|
27
|
+
Succeeded: "Succeeded",
|
|
28
|
+
Creating: "Creating",
|
|
29
|
+
Updating: "Updating",
|
|
30
|
+
Deleting: "Deleting",
|
|
31
|
+
Accepted: "Accepted",
|
|
32
|
+
Failed: "Failed",
|
|
33
|
+
Canceled: "Canceled",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Type of issue */
|
|
37
|
+
@added(Versions.v5)
|
|
38
|
+
union IssueType {
|
|
39
|
+
string,
|
|
40
|
+
|
|
41
|
+
/** Unknown issue type */
|
|
42
|
+
Unknown: "Unknown",
|
|
43
|
+
|
|
44
|
+
/** An error occurred while applying the network security perimeter (NSP) configuration. */
|
|
45
|
+
ConfigurationPropagationFailure: "ConfigurationPropagationFailure",
|
|
46
|
+
|
|
47
|
+
/** A network connectivity issue is happening on the resource which could be addressed either by adding new resources to the network security perimeter (NSP) or by modifying access rules. */
|
|
48
|
+
MissingPerimeterConfiguration: "MissingPerimeterConfiguration",
|
|
49
|
+
|
|
50
|
+
/** An managed identity hasn't been associated with the resource. The resource will still be able to validate inbound traffic from the network security perimeter (NSP) or matching inbound access rules, but it won't be able to perform outbound access as a member of the NSP. */
|
|
51
|
+
MissingIdentityConfiguration: "MissingIdentityConfiguration",
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Severity of the issue. */
|
|
55
|
+
@added(Versions.v5)
|
|
56
|
+
union Severity {
|
|
57
|
+
string,
|
|
58
|
+
Warning: "Warning",
|
|
59
|
+
Error: "Error",
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Access mode of the resource association */
|
|
63
|
+
@added(Versions.v5)
|
|
64
|
+
union ResourceAssociationAccessMode {
|
|
65
|
+
string,
|
|
66
|
+
|
|
67
|
+
/** Enforced access mode - traffic to the resource that failed access checks is blocked */
|
|
68
|
+
Enforced: "Enforced",
|
|
69
|
+
|
|
70
|
+
/** Learning access mode - traffic to the resource is enabled for analysis but not blocked */
|
|
71
|
+
Learning: "Learning",
|
|
72
|
+
|
|
73
|
+
/** Audit access mode - traffic to the resource that fails access checks is logged but not blocked */
|
|
74
|
+
Audit: "Audit",
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Allow, disallow, or let network security perimeter configuration control public network access to the protected resource. Value is optional but if passed in, it must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. */
|
|
78
|
+
@added(Versions.v5)
|
|
79
|
+
union PublicNetworkAccess {
|
|
80
|
+
string,
|
|
81
|
+
|
|
82
|
+
/** Allows public network access to the resource */
|
|
83
|
+
Enabled: "Enabled",
|
|
84
|
+
|
|
85
|
+
/** Disallows public network access to the resource */
|
|
86
|
+
Disabled: "Disabled",
|
|
87
|
+
|
|
88
|
+
/** The network security perimeter configuration rules allow or disallow public network access to the resource. Requires an associated network security perimeter. */
|
|
89
|
+
SecuredByPerimeter: "SecuredByPerimeter",
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Access rule in a network security perimeter configuration profile */
|
|
93
|
+
@added(Versions.v5)
|
|
94
|
+
model AccessRule {
|
|
95
|
+
/** Name of the access rule */
|
|
96
|
+
name?: string;
|
|
97
|
+
|
|
98
|
+
properties?: AccessRuleProperties;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Properties of Access Rule */
|
|
102
|
+
@added(Versions.v5)
|
|
103
|
+
model AccessRuleProperties {
|
|
104
|
+
direction?: AccessRuleDirection;
|
|
105
|
+
|
|
106
|
+
/** Address prefixes in the CIDR format for inbound rules */
|
|
107
|
+
addressPrefixes?: string[];
|
|
108
|
+
|
|
109
|
+
/** Subscriptions for inbound rules */
|
|
110
|
+
subscriptions?: {
|
|
111
|
+
/** The fully qualified Azure resource ID of the subscription e.g. ('/subscriptions/00000000-0000-0000-0000-000000000000') */
|
|
112
|
+
id?: Azure.Core.armResourceIdentifier;
|
|
113
|
+
}[];
|
|
114
|
+
|
|
115
|
+
/** Network security perimeters for inbound rules */
|
|
116
|
+
networkSecurityPerimeters?: NetworkSecurityPerimeter[];
|
|
117
|
+
|
|
118
|
+
/** Fully qualified domain names (FQDN) for outbound rules */
|
|
119
|
+
fullyQualifiedDomainNames?: string[];
|
|
120
|
+
|
|
121
|
+
/** Email addresses for outbound rules */
|
|
122
|
+
emailAddresses?: string[];
|
|
123
|
+
|
|
124
|
+
/** Phone numbers for outbound rules */
|
|
125
|
+
phoneNumbers?: string[];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Information about a network security perimeter (NSP) */
|
|
129
|
+
@added(Versions.v5)
|
|
130
|
+
model NetworkSecurityPerimeter {
|
|
131
|
+
/** Fully qualified Azure resource ID of the NSP resource */
|
|
132
|
+
id?: Azure.Core.armResourceIdentifier<[
|
|
133
|
+
{
|
|
134
|
+
type: "Microsoft.Network/networkSecurityPerimeters";
|
|
135
|
+
}
|
|
136
|
+
]>;
|
|
137
|
+
|
|
138
|
+
/** Universal unique ID (UUID) of the network security perimeter */
|
|
139
|
+
perimeterGuid?: uuid;
|
|
140
|
+
|
|
141
|
+
/** Location of the network security perimeter */
|
|
142
|
+
@visibility("read", "create")
|
|
143
|
+
location?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** Network security perimeter (NSP) configuration resource */
|
|
147
|
+
@added(Versions.v5)
|
|
148
|
+
model NetworkSecurityPerimeterConfiguration extends ProxyResource {
|
|
149
|
+
properties?: NetworkSecurityPerimeterConfigurationProperties;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** Network security configuration properties. */
|
|
153
|
+
@added(Versions.v5)
|
|
154
|
+
model NetworkSecurityPerimeterConfigurationProperties {
|
|
155
|
+
@visibility("read")
|
|
156
|
+
provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState;
|
|
157
|
+
|
|
158
|
+
/** List of provisioning issues, if any */
|
|
159
|
+
@visibility("read")
|
|
160
|
+
@OpenAPI.extension("x-ms-identifiers", [])
|
|
161
|
+
provisioningIssues?: ProvisioningIssue[];
|
|
162
|
+
|
|
163
|
+
networkSecurityPerimeter?: NetworkSecurityPerimeter;
|
|
164
|
+
resourceAssociation?: ResourceAssociation;
|
|
165
|
+
profile?: NetworkSecurityProfile;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** Describes a provisioning issue for a network security perimeter configuration */
|
|
169
|
+
@added(Versions.v5)
|
|
170
|
+
model ProvisioningIssue {
|
|
171
|
+
/** Name of the issue */
|
|
172
|
+
@visibility("read")
|
|
173
|
+
name?: string;
|
|
174
|
+
|
|
175
|
+
@visibility("read")
|
|
176
|
+
properties?: ProvisioningIssueProperties;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should generate separate provisioning issue elements for each separate issue detected, and include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules */
|
|
180
|
+
@added(Versions.v5)
|
|
181
|
+
model ProvisioningIssueProperties {
|
|
182
|
+
/** Type of issue */
|
|
183
|
+
@visibility("read")
|
|
184
|
+
issueType?: IssueType;
|
|
185
|
+
|
|
186
|
+
/** Severity of the issue. */
|
|
187
|
+
@visibility("read")
|
|
188
|
+
severity?: Severity;
|
|
189
|
+
|
|
190
|
+
/** Description of the issue */
|
|
191
|
+
@visibility("read")
|
|
192
|
+
description?: string;
|
|
193
|
+
|
|
194
|
+
/** Fully qualified resource IDs of suggested resources that can be associated to the network security perimeter (NSP) to remediate the issue. */
|
|
195
|
+
@visibility("read")
|
|
196
|
+
suggestedResourceIds?: Azure.Core.armResourceIdentifier[];
|
|
197
|
+
|
|
198
|
+
/** Access rules that can be added to the network security profile (NSP) to remediate the issue. */
|
|
199
|
+
@visibility("read")
|
|
200
|
+
@OpenAPI.extension("x-ms-identifiers", [])
|
|
201
|
+
suggestedAccessRules?: AccessRule[];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** Information about resource association */
|
|
205
|
+
@added(Versions.v5)
|
|
206
|
+
model ResourceAssociation {
|
|
207
|
+
/** Name of the resource association */
|
|
208
|
+
name?: string;
|
|
209
|
+
|
|
210
|
+
accessMode?: ResourceAssociationAccessMode;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** Network security perimeter configuration profile */
|
|
214
|
+
@added(Versions.v5)
|
|
215
|
+
model NetworkSecurityProfile {
|
|
216
|
+
/** Name of the profile */
|
|
217
|
+
name?: string;
|
|
218
|
+
|
|
219
|
+
/** Current access rules version */
|
|
220
|
+
accessRulesVersion?: int32;
|
|
221
|
+
|
|
222
|
+
/** List of Access Rules */
|
|
223
|
+
@OpenAPI.extension("x-ms-identifiers", ["name"])
|
|
224
|
+
accessRules?: AccessRule[];
|
|
225
|
+
|
|
226
|
+
/** Current diagnostic settings version */
|
|
227
|
+
diagnosticSettingsVersion?: int32;
|
|
228
|
+
|
|
229
|
+
/** List of log categories that are enabled */
|
|
230
|
+
enabledLogCategories?: string[];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** Result of a list NSP (network security perimeter) configurations request. */
|
|
234
|
+
@added(Versions.v5)
|
|
235
|
+
model NetworkSecurityPerimeterConfigurationListResult {
|
|
236
|
+
/** Array of network security perimeter results. */
|
|
237
|
+
value?: NetworkSecurityPerimeterConfiguration[];
|
|
238
|
+
|
|
239
|
+
/** The link used to get the next page of results. */
|
|
240
|
+
nextLink?: url;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The name for a network security perimeter configuration
|
|
245
|
+
* @template Segment The resource type name for network security perimeter configuration (default is networkSecurityPerimeterConfigurations)
|
|
246
|
+
*/
|
|
247
|
+
@added(Versions.v5)
|
|
248
|
+
model NetworkSecurityPerimeterConfigurationNameParameter<Segment extends valueof string = "networkSecurityPerimeterConfigurations"> {
|
|
249
|
+
/** The name for a network security perimeter configuration */
|
|
250
|
+
@path
|
|
251
|
+
@minLength(1)
|
|
252
|
+
@maxLength(512)
|
|
253
|
+
@TypeSpec.Rest.segment(Segment)
|
|
254
|
+
@key("networkSecurityPerimeterConfigurationName")
|
|
255
|
+
name: string;
|
|
256
|
+
}
|
|
@@ -537,10 +537,9 @@ model ManagementGroupNameParameter {
|
|
|
537
537
|
@added(Versions.v4)
|
|
538
538
|
model ScopeParameter {
|
|
539
539
|
/** The scope at which the operation is performed. */
|
|
540
|
-
@path
|
|
540
|
+
@path(#{ allowReserved: true })
|
|
541
541
|
@segment("scope")
|
|
542
542
|
@minLength(1)
|
|
543
|
-
@extension("x-ms-skip-url-encoding", true)
|
|
544
543
|
scope: string;
|
|
545
544
|
}
|
|
546
545
|
|
package/lib/parameters.tsp
CHANGED
|
@@ -83,9 +83,8 @@ model ArmLocationResource<BaseType extends
|
|
|
83
83
|
*/
|
|
84
84
|
@doc("The default resourceUri parameter type.")
|
|
85
85
|
model ResourceUriParameter {
|
|
86
|
-
@path
|
|
86
|
+
@path(#{ allowReserved: true })
|
|
87
87
|
@doc("The fully qualified Azure Resource manager identifier of the resource.")
|
|
88
|
-
@extension("x-ms-skip-url-encoding", true)
|
|
89
88
|
@resourceParameterBaseFor([ResourceHome.Extension])
|
|
90
89
|
resourceUri: string;
|
|
91
90
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.47.0-dev.
|
|
3
|
+
"version": "0.47.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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@azure-tools/typespec-azure-core": "~0.46.0 || >=0.47.0-dev <0.47.0",
|
|
47
|
-
"@typespec/compiler": "~0.60.
|
|
47
|
+
"@typespec/compiler": "~0.60.1 || >=0.61.0-dev <0.61.0",
|
|
48
48
|
"@typespec/http": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
49
49
|
"@typespec/openapi": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
50
50
|
"@typespec/rest": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
@@ -52,20 +52,20 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@azure-tools/typespec-azure-core": "~0.46.0 || >=0.47.0-dev <0.47.0",
|
|
55
|
-
"@types/node": "~
|
|
55
|
+
"@types/node": "~22.7.1",
|
|
56
56
|
"@types/pluralize": "^0.0.33",
|
|
57
|
-
"@typespec/compiler": "~0.60.
|
|
57
|
+
"@typespec/compiler": "~0.60.1 || >=0.61.0-dev <0.61.0",
|
|
58
58
|
"@typespec/http": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
59
59
|
"@typespec/library-linter": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
60
60
|
"@typespec/openapi": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
61
61
|
"@typespec/rest": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
62
62
|
"@typespec/versioning": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
63
|
-
"@vitest/coverage-v8": "^2.
|
|
64
|
-
"@vitest/ui": "^2.
|
|
63
|
+
"@vitest/coverage-v8": "^2.1.1",
|
|
64
|
+
"@vitest/ui": "^2.1.1",
|
|
65
65
|
"c8": "^10.1.2",
|
|
66
66
|
"rimraf": "~6.0.1",
|
|
67
|
-
"typescript": "~5.
|
|
68
|
-
"vitest": "^2.
|
|
67
|
+
"typescript": "~5.6.2",
|
|
68
|
+
"vitest": "^2.1.1",
|
|
69
69
|
"@typespec/tspd": "~0.46.0"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|