Skip to content

Commit 1118c0d

Browse files
author
SDKAuto
committed
CodeGen from PR 23959 in Azure/azure-rest-api-specs
Merge b883d72e9caa3b0b62d1ee180d3024f1bffc0db6 into ac98588da3cf3c3e043568adc8a6cc122ad8d6a7
1 parent 902eafd commit 1118c0d

File tree

10 files changed

+97
-59
lines changed

10 files changed

+97
-59
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 36 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/features/arm-features/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2022 Microsoft
3+
Copyright (c) 2023 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/features/arm-features/_meta.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "a42f1b58607091c4f255ead152a8ef323fa0b280",
3-
"readme": "specification\\resources\\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\\resources\\resource-manager\\readme.md --use=@autorest/[email protected].3.20221108.1 --generate-sample=true",
2+
"commit": "b5ad6284ef07b570df3d2234d6312454e557980c",
3+
"readme": "specification/resources/resource-manager/readme.md",
4+
"autorest_command": "autorest --version=3.9.3 --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/resources/resource-manager/readme.md --use=@autorest/[email protected].10",
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.20221108.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
7+
"use": "@autorest/[email protected].10"
88
}

sdk/features/arm-features/package.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"dependencies": {
1111
"@azure/core-paging": "^1.2.0",
12-
"@azure/core-client": "^1.6.1",
12+
"@azure/core-client": "^1.7.0",
1313
"@azure/core-auth": "^1.3.0",
1414
"@azure/core-rest-pipeline": "^1.8.0",
1515
"tslib": "^2.2.0"
@@ -31,12 +31,13 @@
3131
"@rollup/plugin-json": "^6.0.0",
3232
"@rollup/plugin-multi-entry": "^6.0.0",
3333
"@rollup/plugin-node-resolve": "^13.1.3",
34-
"mkdirp": "^1.0.4",
34+
"mkdirp": "^2.1.2",
3535
"rollup": "^2.66.1",
3636
"rollup-plugin-sourcemaps": "^0.6.3",
37-
"typescript": "~5.0.0",
37+
"typescript": "~4.8.0",
3838
"uglify-js": "^3.4.9",
3939
"rimraf": "^3.0.0",
40+
"dotenv": "^16.0.0",
4041
"@azure/identity": "^2.0.1",
4142
"@azure-tools/test-recorder": "^3.0.0",
4243
"@azure-tools/test-credential": "^1.0.0",
@@ -47,7 +48,6 @@
4748
"@types/node": "^14.0.0",
4849
"@azure/dev-tool": "^1.0.0"
4950
},
50-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/features/arm-features",
5151
"repository": {
5252
"type": "git",
5353
"url": "https://github.com/Azure/azure-sdk-for-js.git"
@@ -109,12 +109,5 @@
109109
]
110110
},
111111
"autoPublish": true,
112-
"//sampleConfiguration": {
113-
"productName": "",
114-
"productSlugs": [
115-
"azure"
116-
],
117-
"disableDocsMs": true,
118-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-features?view=azure-node-preview"
119-
}
120-
}
112+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/features/arm-features"
113+
}

sdk/features/arm-features/src/featureClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ const listOperationsNextOperationSpec: coreClient.OperationSpec = {
269269
bodyMapper: Mappers.ErrorResponse
270270
}
271271
},
272-
queryParameters: [Parameters.apiVersion],
273272
urlParameters: [Parameters.$host, Parameters.nextLink],
274273
headerParameters: [Parameters.accept],
275274
serializer

sdk/features/arm-features/src/operations/features.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ const listAllNextOperationSpec: coreClient.OperationSpec = {
394394
bodyMapper: Mappers.ErrorResponse
395395
}
396396
},
397-
queryParameters: [Parameters.apiVersion],
398397
urlParameters: [
399398
Parameters.$host,
400399
Parameters.nextLink,
@@ -414,7 +413,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
414413
bodyMapper: Mappers.ErrorResponse
415414
}
416415
},
417-
queryParameters: [Parameters.apiVersion],
418416
urlParameters: [
419417
Parameters.$host,
420418
Parameters.nextLink,

sdk/features/arm-features/src/operations/subscriptionFeatureRegistrations.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
402402
bodyMapper: Mappers.ErrorResponse
403403
}
404404
},
405-
queryParameters: [Parameters.apiVersion],
406405
urlParameters: [
407406
Parameters.$host,
408407
Parameters.nextLink,
@@ -423,7 +422,6 @@ const listAllBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
423422
bodyMapper: Mappers.ErrorResponse
424423
}
425424
},
426-
queryParameters: [Parameters.apiVersion],
427425
urlParameters: [
428426
Parameters.$host,
429427
Parameters.nextLink,

sdk/features/arm-features/src/pagingHelper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export interface PageInfo {
1313
const pageMap = new WeakMap<object, PageInfo>();
1414

1515
/**
16-
* Given a result page from a pageable operation, returns a
17-
* continuation token that can be used to begin paging from
16+
* Given the last `.value` produced by the `byPage` iterator,
17+
* returns a continuation token that can be used to begin paging from
1818
* that point later.
19-
* @param page A result object from calling .byPage() on a paged operation.
20-
* @returns The continuation token that can be passed into byPage().
19+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
20+
* @returns The continuation token that can be passed into byPage() during future calls.
2121
*/
2222
export function getContinuationToken(page: unknown): string | undefined {
2323
if (typeof page !== "object" || page === null) {
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+
});

0 commit comments

Comments
 (0)