Skip to content

Commit 82eef5e

Browse files
author
SDKAuto
committed
CodeGen from PR 21356 in Azure/azure-rest-api-specs
Merge 87446cd401de335e481eefd7df19e6cfc6e1bba8 into 4047b23b6e1a6bf2203d20db86d2f5eab43f7340
1 parent ac2d0b5 commit 82eef5e

File tree

8 files changed

+63
-29
lines changed

8 files changed

+63
-29
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Release History
22

3-
## 1.0.0 (2022-10-24)
3+
## 1.0.0 (2022-11-04)
44

55
The package of @azure/arm-loadtestservice is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "3927945ce9bd4ac8c252b6bd558a2c42aa2877cc",
2+
"commit": "dc3d2f94d80376afe2fe88a1424a71275a87e42e",
33
"readme": "specification/loadtestservice/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\loadtestservice\\resource-manager\\readme.md --use=@autorest/[email protected].3.20221020.1 --generate-sample=true",
4+
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/loadtestservice/resource-manager/readme.md --use=@autorest/[email protected].2",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
7-
"use": "@autorest/[email protected].3.20221020.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.0",
7+
"use": "@autorest/[email protected].2"
88
}

sdk/loadtestservice/arm-loadtestservice/package.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@azure/core-lro": "^2.2.0",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
14-
"@azure/core-client": "^1.6.1",
14+
"@azure/core-client": "^1.5.0",
1515
"@azure/core-auth": "^1.3.0",
1616
"@azure/core-rest-pipeline": "^1.8.0",
1717
"tslib": "^2.2.0"
@@ -46,7 +46,6 @@
4646
"@types/chai": "^4.2.8",
4747
"chai": "^4.2.0",
4848
"cross-env": "^7.0.2",
49-
"@types/node": "^14.0.0",
5049
"@azure/dev-tool": "^1.0.0"
5150
},
5251
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtestservice",
@@ -110,13 +109,5 @@
110109
}
111110
]
112111
},
113-
"autoPublish": true,
114-
"//sampleConfiguration": {
115-
"productName": "",
116-
"productSlugs": [
117-
"azure"
118-
],
119-
"disableDocsMs": true,
120-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-loadtestservice?view=azure-node-preview"
121-
}
112+
"autoPublish": true
122113
}

sdk/loadtestservice/arm-loadtestservice/review/arm-loadtestservice.api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ export interface LoadTestResourcePatchRequestBody {
152152
description?: string;
153153
encryption?: EncryptionProperties;
154154
identity?: ManagedServiceIdentity;
155-
tags?: Record<string, unknown>;
155+
tags?: {
156+
[propertyName: string]: string | null;
157+
};
156158
}
157159

158160
// @public
@@ -248,7 +250,7 @@ export interface ManagedServiceIdentity {
248250
readonly tenantId?: string;
249251
type: ManagedServiceIdentityType;
250252
userAssignedIdentities?: {
251-
[propertyName: string]: UserAssignedIdentity;
253+
[propertyName: string]: UserAssignedIdentity | null;
252254
};
253255
}
254256

sdk/loadtestservice/arm-loadtestservice/src/models/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ export interface ManagedServiceIdentity {
222222
/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */
223223
type: ManagedServiceIdentityType;
224224
/** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */
225-
userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity };
225+
userAssignedIdentities?: {
226+
[propertyName: string]: UserAssignedIdentity | null;
227+
};
226228
}
227229

228230
/** User assigned identity properties */
@@ -242,7 +244,7 @@ export interface UserAssignedIdentity {
242244
/** LoadTest resource patch request body. */
243245
export interface LoadTestResourcePatchRequestBody {
244246
/** Resource tags. */
245-
tags?: Record<string, unknown>;
247+
tags?: { [propertyName: string]: string | null };
246248
/** The type of identity used for the resource. */
247249
identity?: ManagedServiceIdentity;
248250
/** Description of the resource. */

sdk/loadtestservice/arm-loadtestservice/src/models/mappers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ export const EncryptionPropertiesIdentity: coreClient.CompositeMapper = {
414414
},
415415
resourceId: {
416416
serializedName: "resourceId",
417+
nullable: true,
417418
type: {
418419
name: "String"
419420
}
@@ -491,9 +492,10 @@ export const LoadTestResourcePatchRequestBody: coreClient.CompositeMapper = {
491492
modelProperties: {
492493
tags: {
493494
serializedName: "tags",
495+
nullable: true,
494496
type: {
495497
name: "Dictionary",
496-
value: { type: { name: "any" } }
498+
value: { type: { name: "String" } }
497499
}
498500
},
499501
identity: {
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
import {
10+
Recorder,
11+
RecorderStartOptions,
12+
env
13+
} from "@azure-tools/test-recorder";
14+
import { assert } from "chai";
15+
import { Context } from "mocha";
16+
17+
const replaceableVariables: Record<string, string> = {
18+
AZURE_CLIENT_ID: "azure_client_id",
19+
AZURE_CLIENT_SECRET: "azure_client_secret",
20+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
21+
SUBSCRIPTION_ID: "azure_subscription_id"
22+
};
23+
24+
const recorderOptions: RecorderStartOptions = {
25+
envSetupForPlayback: replaceableVariables
26+
};
27+
28+
describe("My test", () => {
29+
let recorder: Recorder;
30+
31+
beforeEach(async function(this: Context) {
32+
recorder = new Recorder(this.currentTest);
33+
await recorder.start(recorderOptions);
34+
});
35+
36+
afterEach(async function() {
37+
await recorder.stop();
38+
});
39+
40+
it("sample test", async function() {
41+
console.log("Hi, I'm a test!");
42+
});
43+
});

sdk/loadtestservice/arm-loadtestservice/tsconfig.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@
1515
],
1616
"declaration": true,
1717
"outDir": "./dist-esm",
18-
"importHelpers": true,
19-
"paths": {
20-
"@azure/arm-loadtestservice": [
21-
"./src/index"
22-
]
23-
}
18+
"importHelpers": true
2419
},
2520
"include": [
2621
"./src/**/*.ts",
27-
"./test/**/*.ts",
28-
"samples-dev/**/*.ts"
22+
"./test/**/*.ts"
2923
],
3024
"exclude": [
3125
"node_modules"

0 commit comments

Comments
 (0)