Skip to content

Commit ed28571

Browse files
author
SDKAuto
committed
CodeGen from PR 19554 in Azure/azure-rest-api-specs
Merge f1bbd2059fa3b0247ab822079173327bd92b66d1 into 96e52e2b911d533f95a0ad8e324c828d556c5f2b
1 parent dc8b5b9 commit ed28571

File tree

8 files changed

+62
-107
lines changed

8 files changed

+62
-107
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "8a9bd9c5b65e5c3e5a8536f3c5b2b15bf9920b5d",
2+
"commit": "07f112576ba8649a4fc6539101ae2f092bf351d1",
33
"readme": "specification/reservations/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\reservations\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --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/reservations/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
7-
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.2",
7+
"use": "@autorest/typescript@6.0.0-alpha.19.20220425.1"
88
}

sdk/reservations/arm-reservations/package.json

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for AzureReservationAPI.",
6-
"version": "7.1.0",
6+
"version": "7.1.1",
77
"engines": {
88
"node": ">=12.0.0"
99
},
@@ -40,9 +40,11 @@
4040
"uglify-js": "^3.4.9",
4141
"rimraf": "^3.0.0",
4242
"@azure/identity": "^2.0.1",
43-
"@azure-tools/test-recorder": "^1.0.0",
43+
"@azure-tools/test-recorder": "^2.0.0",
44+
"@azure-tools/test-credential": "^1.0.0",
4445
"mocha": "^7.1.1",
45-
"cross-env": "^7.0.2"
46+
"cross-env": "^7.0.2",
47+
"@azure/dev-tool": "^1.0.0"
4648
},
4749
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/reservations/arm-reservations",
4850
"repository": {
@@ -93,7 +95,7 @@
9395
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
9496
"unit-test:browser": "echo skipped",
9597
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
96-
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
98+
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
9799
"integration-test:browser": "echo skipped",
98100
"docs": "echo skipped"
99101
},
@@ -106,13 +108,5 @@
106108
}
107109
]
108110
},
109-
"autoPublish": true,
110-
"//sampleConfiguration": {
111-
"productName": "",
112-
"productSlugs": [
113-
"azure"
114-
],
115-
"disableDocsMs": true,
116-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-reservations?view=azure-node-preview"
117-
}
118-
}
111+
"autoPublish": true
112+
}

sdk/reservations/arm-reservations/src/azureReservationAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class AzureReservationAPI extends coreClient.ServiceClient {
6262
credential: credentials
6363
};
6464

65-
const packageDetails = `azsdk-js-arm-reservations/7.1.0`;
65+
const packageDetails = `azsdk-js-arm-reservations/7.1.1`;
6666
const userAgentPrefix =
6767
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
6868
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,11 +2095,9 @@ export type QuotaRequestStatusGetResponse = QuotaRequestDetails;
20952095
export interface QuotaRequestStatusListOptionalParams
20962096
extends coreClient.OperationOptions {
20972097
/**
2098-
* | Field | Supported operators
2099-
* |---------------------|------------------------
2100-
*
2101-
* |requestSubmitTime | ge, le, eq, gt, lt
2102-
*
2098+
* | Field | Supported operators |
2099+
* |---------------------|------------------------|
2100+
* |requestSubmitTime | ge, le, eq, gt, lt |
21032101
*/
21042102
filter?: string;
21052103
/** Number of records to return. */
@@ -2115,11 +2113,9 @@ export type QuotaRequestStatusListResponse = QuotaRequestDetailsList;
21152113
export interface QuotaRequestStatusListNextOptionalParams
21162114
extends coreClient.OperationOptions {
21172115
/**
2118-
* | Field | Supported operators
2119-
* |---------------------|------------------------
2120-
*
2121-
* |requestSubmitTime | ge, le, eq, gt, lt
2122-
*
2116+
* | Field | Supported operators |
2117+
* |---------------------|------------------------|
2118+
* |requestSubmitTime | ge, le, eq, gt, lt |
21232119
*/
21242120
filter?: string;
21252121
/** Number of records to return. */

sdk/reservations/arm-reservations/src/operations/quota.ts

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,9 @@ export class QuotaImpl implements Quota {
148148
/**
149149
* Create or update the quota (service limits) of a resource to the requested value.
150150
* Steps:
151-
*
152-
1. Make the Get request to get the quota information for specific resource.
153-
*
154-
2. To increase the quota, update the limit field in the response from Get request to new value.
155-
*
156-
3. Submit the JSON to the quota request API to update the quota.
151+
* 1. Make the Get request to get the quota information for specific resource.
152+
* 2. To increase the quota, update the limit field in the response from Get request to new value.
153+
* 3. Submit the JSON to the quota request API to update the quota.
157154
* The Create quota request may be constructed as follows. The PUT operation can be used to update
158155
* the quota.
159156
* @param subscriptionId Azure subscription ID.
@@ -240,12 +237,9 @@ export class QuotaImpl implements Quota {
240237
/**
241238
* Create or update the quota (service limits) of a resource to the requested value.
242239
* Steps:
243-
*
244-
1. Make the Get request to get the quota information for specific resource.
245-
*
246-
2. To increase the quota, update the limit field in the response from Get request to new value.
247-
*
248-
3. Submit the JSON to the quota request API to update the quota.
240+
* 1. Make the Get request to get the quota information for specific resource.
241+
* 2. To increase the quota, update the limit field in the response from Get request to new value.
242+
* 3. Submit the JSON to the quota request API to update the quota.
249243
* The Create quota request may be constructed as follows. The PUT operation can be used to update
250244
* the quota.
251245
* @param subscriptionId Azure subscription ID.
@@ -277,12 +271,9 @@ export class QuotaImpl implements Quota {
277271

278272
/**
279273
* Update the quota (service limits) of this resource to the requested value.
280-
*
281-
• To get the quota information for specific resource, send a GET request.
282-
*
283-
• To increase the quota, update the limit field from the GET response to a new value.
284-
*
285-
• To update the quota value, submit the JSON response to the quota request API to update the
274+
* • To get the quota information for specific resource, send a GET request.
275+
* • To increase the quota, update the limit field from the GET response to a new value.
276+
* • To update the quota value, submit the JSON response to the quota request API to update the
286277
* quota.
287278
* • To update the quota. use the PATCH operation.
288279
* @param subscriptionId Azure subscription ID.
@@ -365,12 +356,9 @@ export class QuotaImpl implements Quota {
365356

366357
/**
367358
* Update the quota (service limits) of this resource to the requested value.
368-
*
369-
• To get the quota information for specific resource, send a GET request.
370-
*
371-
• To increase the quota, update the limit field from the GET response to a new value.
372-
*
373-
• To update the quota value, submit the JSON response to the quota request API to update the
359+
* • To get the quota information for specific resource, send a GET request.
360+
* • To increase the quota, update the limit field from the GET response to a new value.
361+
* • To update the quota value, submit the JSON response to the quota request API to update the
374362
* quota.
375363
* • To update the quota. use the PATCH operation.
376364
* @param subscriptionId Azure subscription ID.

sdk/reservations/arm-reservations/src/operationsInterfaces/quota.ts

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,9 @@ export interface Quota {
5656
/**
5757
* Create or update the quota (service limits) of a resource to the requested value.
5858
* Steps:
59-
*
60-
1. Make the Get request to get the quota information for specific resource.
61-
*
62-
2. To increase the quota, update the limit field in the response from Get request to new value.
63-
*
64-
3. Submit the JSON to the quota request API to update the quota.
59+
* 1. Make the Get request to get the quota information for specific resource.
60+
* 2. To increase the quota, update the limit field in the response from Get request to new value.
61+
* 3. Submit the JSON to the quota request API to update the quota.
6562
* The Create quota request may be constructed as follows. The PUT operation can be used to update
6663
* the quota.
6764
* @param subscriptionId Azure subscription ID.
@@ -88,12 +85,9 @@ export interface Quota {
8885
/**
8986
* Create or update the quota (service limits) of a resource to the requested value.
9087
* Steps:
91-
*
92-
1. Make the Get request to get the quota information for specific resource.
93-
*
94-
2. To increase the quota, update the limit field in the response from Get request to new value.
95-
*
96-
3. Submit the JSON to the quota request API to update the quota.
88+
* 1. Make the Get request to get the quota information for specific resource.
89+
* 2. To increase the quota, update the limit field in the response from Get request to new value.
90+
* 3. Submit the JSON to the quota request API to update the quota.
9791
* The Create quota request may be constructed as follows. The PUT operation can be used to update
9892
* the quota.
9993
* @param subscriptionId Azure subscription ID.
@@ -114,12 +108,9 @@ export interface Quota {
114108
): Promise<QuotaCreateOrUpdateResponse>;
115109
/**
116110
* Update the quota (service limits) of this resource to the requested value.
117-
*
118-
• To get the quota information for specific resource, send a GET request.
119-
*
120-
• To increase the quota, update the limit field from the GET response to a new value.
121-
*
122-
• To update the quota value, submit the JSON response to the quota request API to update the
111+
* • To get the quota information for specific resource, send a GET request.
112+
* • To increase the quota, update the limit field from the GET response to a new value.
113+
* • To update the quota value, submit the JSON response to the quota request API to update the
123114
* quota.
124115
* • To update the quota. use the PATCH operation.
125116
* @param subscriptionId Azure subscription ID.
@@ -142,12 +133,9 @@ export interface Quota {
142133
>;
143134
/**
144135
* Update the quota (service limits) of this resource to the requested value.
145-
*
146-
• To get the quota information for specific resource, send a GET request.
147-
*
148-
• To increase the quota, update the limit field from the GET response to a new value.
149-
*
150-
• To update the quota value, submit the JSON response to the quota request API to update the
136+
* • To get the quota information for specific resource, send a GET request.
137+
* • To increase the quota, update the limit field from the GET response to a new value.
138+
* • To update the quota value, submit the JSON response to the quota request API to update the
151139
* quota.
152140
* • To update the quota. use the PATCH operation.
153141
* @param subscriptionId Azure subscription ID.

sdk/reservations/arm-reservations/test/sampleTest.ts

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,30 @@
77
*/
88

99
import {
10-
env,
11-
record,
12-
RecorderEnvironmentSetup,
13-
Recorder
10+
Recorder,
11+
RecorderStartOptions,
12+
env
1413
} from "@azure-tools/test-recorder";
15-
import * as assert from "assert";
14+
import { assert } from "chai";
15+
import { Context } from "mocha";
1616

17-
const recorderEnvSetup: RecorderEnvironmentSetup = {
18-
replaceableVariables: {
19-
AZURE_CLIENT_ID: "azure_client_id",
20-
AZURE_CLIENT_SECRET: "azure_client_secret",
21-
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
22-
SUBSCRIPTION_ID: "azure_subscription_id"
23-
},
24-
customizationsOnRecordings: [
25-
(recording: any): any =>
26-
recording.replace(
27-
/"access_token":"[^"]*"/g,
28-
`"access_token":"access_token"`
29-
)
30-
],
31-
queryParametersToSkip: []
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
3226
};
3327

3428
describe("My test", () => {
3529
let recorder: Recorder;
3630

37-
beforeEach(async function() {
38-
recorder = record(this, recorderEnvSetup);
31+
beforeEach(async function(this: Context) {
32+
recorder = new Recorder(this.currentTest);
33+
await recorder.start(recorderOptions);
3934
});
4035

4136
afterEach(async function() {

sdk/reservations/arm-reservations/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-reservations": [
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)