@azure-tools/typespec-azure-resource-manager 0.31.0-dev.6 → 0.31.0
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/lib/decorators.tsp +4 -4
- package/lib/interfaces.tsp +2 -2
- package/lib/operations.tsp +2 -2
- package/lib/private.decorators.tsp +7 -7
- package/lib/responses.tsp +3 -3
- package/package.json +19 -19
package/lib/decorators.tsp
CHANGED
|
@@ -20,7 +20,7 @@ namespace Azure.ResourceManager;
|
|
|
20
20
|
*
|
|
21
21
|
* @param providerNamespace Provider namespace
|
|
22
22
|
*/
|
|
23
|
-
extern dec armProviderNamespace(target: Namespace, providerNamespace?: string);
|
|
23
|
+
extern dec armProviderNamespace(target: Namespace, providerNamespace?: valueof string);
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* `@singleton` marks an ARM resource model as a singleton resource.
|
|
@@ -32,7 +32,7 @@ extern dec armProviderNamespace(target: Namespace, providerNamespace?: string);
|
|
|
32
32
|
*
|
|
33
33
|
* @param keyValue The name of the singleton resource. Default name is "default".
|
|
34
34
|
*/
|
|
35
|
-
extern dec singleton(target: Model, keyValue?: string | "default");
|
|
35
|
+
extern dec singleton(target: Model, keyValue?: valueof string | "default");
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* `@tenantResource` marks an ARM resource model as a Tenant resource/Root resource/Top-Level resource.
|
|
@@ -107,8 +107,8 @@ extern dec armResourceCollectionAction(target: Operation);
|
|
|
107
107
|
extern dec armRenameListByOperation(
|
|
108
108
|
target: Operation,
|
|
109
109
|
resourceType: Model,
|
|
110
|
-
parentTypeName?: string,
|
|
111
|
-
parentFriendlyTypeName?: string
|
|
110
|
+
parentTypeName?: valueof string,
|
|
111
|
+
parentFriendlyTypeName?: valueof string
|
|
112
112
|
);
|
|
113
113
|
|
|
114
114
|
/**
|
package/lib/interfaces.tsp
CHANGED
|
@@ -159,8 +159,8 @@ interface ResourceListBySubscription<TResource extends ArmResource> {
|
|
|
159
159
|
interface ResourceListByParent<
|
|
160
160
|
TResource extends ArmResource,
|
|
161
161
|
TBaseParameters = BaseParameters<TResource>,
|
|
162
|
-
TParentName extends string = "",
|
|
163
|
-
TParentFriendlyName extends string = ""
|
|
162
|
+
TParentName extends valueof string = "",
|
|
163
|
+
TParentFriendlyName extends valueof string = ""
|
|
164
164
|
> {
|
|
165
165
|
/**
|
|
166
166
|
* List resources by parent.
|
package/lib/operations.tsp
CHANGED
|
@@ -38,8 +38,8 @@ op ArmListBySubscription<TResource extends ArmResource>(
|
|
|
38
38
|
op ArmResourceListByParent<
|
|
39
39
|
TResource extends ArmResource,
|
|
40
40
|
TBaseParameters = BaseParameters<TResource>,
|
|
41
|
-
TParentName extends string = "",
|
|
42
|
-
TParentFriendlyName extends string = ""
|
|
41
|
+
TParentName extends valueof string = "",
|
|
42
|
+
TParentFriendlyName extends valueof string = ""
|
|
43
43
|
>(
|
|
44
44
|
...ResourceParentParameters<TResource, TBaseParameters>
|
|
45
45
|
): ArmResponse<ResourceListResult<TResource>> | ErrorResponse;
|
|
@@ -21,9 +21,9 @@ extern dec assignProviderNameValue(target: ModelProperty, resource: Model);
|
|
|
21
21
|
*/
|
|
22
22
|
extern dec armCommonDefinition(
|
|
23
23
|
target: Model,
|
|
24
|
-
definitionName?: string,
|
|
25
|
-
version?: string,
|
|
26
|
-
referenceFile?: string
|
|
24
|
+
definitionName?: valueof string,
|
|
25
|
+
version?: valueof string,
|
|
26
|
+
referenceFile?: valueof string
|
|
27
27
|
);
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -33,9 +33,9 @@ extern dec armCommonDefinition(
|
|
|
33
33
|
*/
|
|
34
34
|
extern dec armCommonParameter(
|
|
35
35
|
target: ModelProperty,
|
|
36
|
-
definitionName?: string,
|
|
37
|
-
version?: string,
|
|
38
|
-
referenceFile?: string
|
|
36
|
+
definitionName?: valueof string,
|
|
37
|
+
version?: valueof string,
|
|
38
|
+
referenceFile?: valueof string
|
|
39
39
|
);
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -58,7 +58,7 @@ extern dec armResourceInternal(target: Model, properties: Model);
|
|
|
58
58
|
* @internal
|
|
59
59
|
* @param propertyName Name of the property to omit
|
|
60
60
|
*/
|
|
61
|
-
extern dec omitIfEmpty(target: Model, propertyName: string);
|
|
61
|
+
extern dec omitIfEmpty(target: Model, propertyName: valueof string);
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* @param propertyName Name of the property to omit
|
package/lib/responses.tsp
CHANGED
|
@@ -50,7 +50,7 @@ model ArmDeleteAcceptedResponse is ArmAcceptedResponse<"Resource deletion accept
|
|
|
50
50
|
* @template TMessage The description of the response status (defaults to `Resource operation accepted`)
|
|
51
51
|
*/
|
|
52
52
|
@doc(TMessage)
|
|
53
|
-
model ArmAcceptedResponse<TMessage extends string = "Resource operation accepted."> {
|
|
53
|
+
model ArmAcceptedResponse<TMessage extends valueof string = "Resource operation accepted."> {
|
|
54
54
|
...AcceptedResponse;
|
|
55
55
|
...Azure.Core.Foundations.RetryAfterHeader;
|
|
56
56
|
}
|
|
@@ -59,7 +59,7 @@ model ArmAcceptedResponse<TMessage extends string = "Resource operation accepted
|
|
|
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
|
-
model ArmAcceptedLroResponse<TMessage extends string = "Resource operation accepted.">
|
|
62
|
+
model ArmAcceptedLroResponse<TMessage extends valueof string = "Resource operation accepted.">
|
|
63
63
|
is ArmAcceptedResponse<TMessage> {
|
|
64
64
|
@doc("The Location header contains the URL where the status of the long running operation can be checked.")
|
|
65
65
|
@header("Location")
|
|
@@ -76,7 +76,7 @@ model ArmDeletedNoContentResponse is ArmNoContentResponse<"Resource deleted succ
|
|
|
76
76
|
* @template TMessage The description of the response status (defaults to `Operation completed successfully`)
|
|
77
77
|
*/
|
|
78
78
|
@doc(TMessage)
|
|
79
|
-
model ArmNoContentResponse<TMessage extends string = "Operation completed successfully."> {
|
|
79
|
+
model ArmNoContentResponse<TMessage extends valueof string = "Operation completed successfully."> {
|
|
80
80
|
...NoContentResponse;
|
|
81
81
|
}
|
|
82
82
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.31.0
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -42,30 +42,30 @@
|
|
|
42
42
|
"!dist/test/**"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@typespec/compiler": "~0.
|
|
46
|
-
"@azure-tools/typespec-azure-core": "~0.
|
|
47
|
-
"@azure-tools/typespec-autorest": "~0.
|
|
48
|
-
"@typespec/openapi": "~0.
|
|
49
|
-
"@typespec/rest": "~0.
|
|
50
|
-
"@typespec/http": "~0.
|
|
51
|
-
"@typespec/versioning": "~0.
|
|
45
|
+
"@typespec/compiler": "~0.45.0",
|
|
46
|
+
"@azure-tools/typespec-azure-core": "~0.31.0",
|
|
47
|
+
"@azure-tools/typespec-autorest": "~0.31.0",
|
|
48
|
+
"@typespec/openapi": "~0.45.0",
|
|
49
|
+
"@typespec/rest": "~0.45.0",
|
|
50
|
+
"@typespec/http": "~0.45.0",
|
|
51
|
+
"@typespec/versioning": "~0.45.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@typespec/lint": "~0.
|
|
54
|
+
"@typespec/lint": "~0.45.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@typespec/compiler": "~0.
|
|
58
|
-
"@typespec/openapi": "~0.
|
|
59
|
-
"@azure-tools/typespec-azure-core": "~0.
|
|
60
|
-
"@azure-tools/typespec-autorest": "~0.
|
|
61
|
-
"@typespec/rest": "~0.
|
|
62
|
-
"@typespec/http": "~0.
|
|
63
|
-
"@typespec/versioning": "~0.
|
|
57
|
+
"@typespec/compiler": "~0.45.0",
|
|
58
|
+
"@typespec/openapi": "~0.45.0",
|
|
59
|
+
"@azure-tools/typespec-azure-core": "~0.31.0",
|
|
60
|
+
"@azure-tools/typespec-autorest": "~0.31.0",
|
|
61
|
+
"@typespec/rest": "~0.45.0",
|
|
62
|
+
"@typespec/http": "~0.45.0",
|
|
63
|
+
"@typespec/versioning": "~0.45.0",
|
|
64
64
|
"@types/mocha": "~10.0.0",
|
|
65
65
|
"@types/node": "~18.11.9",
|
|
66
|
-
"@typespec/eslint-config-typespec": "~0.7.0
|
|
67
|
-
"@typespec/library-linter": "~0.
|
|
68
|
-
"@typespec/eslint-plugin": "~0.
|
|
66
|
+
"@typespec/eslint-config-typespec": "~0.7.0",
|
|
67
|
+
"@typespec/library-linter": "~0.45.0",
|
|
68
|
+
"@typespec/eslint-plugin": "~0.45.0",
|
|
69
69
|
"eslint": "^8.36.0",
|
|
70
70
|
"mocha": "~10.2.0",
|
|
71
71
|
"mocha-junit-reporter": "~2.2.0",
|