Skip to content

Commit 04fed91

Browse files
author
SDKAuto
committed
CodeGen from PR 18179 in Azure/azure-rest-api-specs
Merge 32a02bdb34d532d5b284667e4b45d51fa43dfe14 into e14d80ab3f3630e8640ccd3b01e5ec9df647dc73
1 parent 6291f91 commit 04fed91

File tree

7 files changed

+59
-29
lines changed

7 files changed

+59
-29
lines changed

sdk/iothub/arm-iothub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Use this API to manage the IoT hubs in your Azure subscription.
66

77
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iothub/arm-iothub) |
88
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-iothub) |
9-
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iothub) |
9+
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iothub?view=azure-node-preview) |
1010
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
1111

1212
## Getting started

sdk/iothub/arm-iothub/_meta.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"commit": "5b02f0befa6eaaaf93afc11274795c651e6e3c0c",
2+
"commit": "76117c6d52cd33ab3f78441f8a002db95281589e",
33
"readme": "specification/iothub/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:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/iothub/resource-manager/readme.md --use=@autorest/[email protected].20220128.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=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/iothub/resource-manager/readme.md --use=@autorest/[email protected].20220105.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"use": "@autorest/[email protected]"
6+
"release_tool": "@azure-tools/[email protected]",
7+
"use": "@autorest/[email protected]"
78
}

sdk/iothub/arm-iothub/package.json

Lines changed: 2 additions & 18 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 IotHubClient.",
6-
"version": "6.1.0",
6+
"version": "1.0.0-beta.1",
77
"engines": {
88
"node": ">=12.0.0"
99
},
@@ -98,21 +98,5 @@
9898
"docs": "echo skipped"
9999
},
100100
"sideEffects": false,
101-
"//metadata": {
102-
"constantPaths": [
103-
{
104-
"path": "src/iotHubClient.ts",
105-
"prefix": "packageDetails"
106-
}
107-
]
108-
},
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-iothub?view=azure-node-preview"
117-
}
101+
"autoPublish": true
118102
}

sdk/iothub/arm-iothub/src/iotHubClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class IotHubClient extends coreClient.ServiceClient {
6060
credential: credentials
6161
};
6262

63-
const packageDetails = `azsdk-js-arm-iothub/6.1.0`;
63+
const packageDetails = `azsdk-js-arm-iothub/1.0.0-beta.1`;
6464
const userAgentPrefix =
6565
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
6666
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
env,
11+
record,
12+
RecorderEnvironmentSetup,
13+
Recorder
14+
} from "@azure-tools/test-recorder";
15+
import * as assert from "assert";
16+
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: []
32+
};
33+
34+
describe("My test", () => {
35+
let recorder: Recorder;
36+
37+
beforeEach(async function() {
38+
recorder = record(this, recorderEnvSetup);
39+
});
40+
41+
afterEach(async function() {
42+
await recorder.stop();
43+
});
44+
45+
it("sample test", async function() {
46+
console.log("Hi, I'm a test!");
47+
});
48+
});

sdk/iothub/arm-iothub/tsconfig.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
],
1616
"declaration": true,
1717
"outDir": "./dist-esm",
18-
"importHelpers": true,
19-
"paths": {
20-
"@azure/arm-iothub": [
21-
"./src/index"
22-
]
23-
}
18+
"importHelpers": true
2419
},
2520
"include": [
2621
"./src/**/*.ts",

sdk/iothub/ci.mgmt.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ trigger:
1111
- sdk/iothub/ci.mgmt.yml
1212
- sdk/iothub/arm-iothub/
1313
- sdk/iothub/arm-iothub-profile-2020-09-01-hybrid
14+
- sdk/iothub/arm-iothub
1415
pr:
1516
branches:
1617
include:
@@ -25,6 +26,7 @@ pr:
2526
- sdk/iothub/ci.mgmt.yml
2627
- sdk/iothub/arm-iothub/
2728
- sdk/iothub/arm-iothub-profile-2020-09-01-hybrid
29+
- sdk/iothub/arm-iothub
2830
extends:
2931
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
3032
parameters:

0 commit comments

Comments
 (0)