Skip to content

Commit

Permalink
CodeGen from PR 17721 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Fix the missing parameter error in kusto spec (Azure#17721)
  • Loading branch information
SDKAuto committed Feb 9, 2022
1 parent 4b81b90 commit b0c8011
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sdk/kusto/arm-kusto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Azure Kusto management API provides a RESTful set of web services that inter

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

## Getting started
Expand Down
6 changes: 3 additions & 3 deletions sdk/kusto/arm-kusto/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247",
"commit": "abb41537b416b30bfe9fca6df98ad0fc64cfb1d7",
"readme": "specification/azure-kusto/resource-manager/readme.md",
"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=C:\\Users\\marygao\\project\\azure-sdk-for-js ../azure-rest-api-specs/specification/azure-kusto/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"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/azure-kusto/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
"use": "@autorest/typescript@6.0.0-alpha.16.20220105.1"
}
2 changes: 1 addition & 1 deletion sdk/kusto/arm-kusto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for KustoManagementClient.",
"version": "7.0.0",
"version": "1.0.0-beta.1",
"engines": {
"node": ">=12.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/kusto/arm-kusto/src/kustoManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class KustoManagementClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-kusto/7.0.0`;
const packageDetails = `azsdk-js-arm-kusto/1.0.0-beta.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
48 changes: 48 additions & 0 deletions sdk/kusto/arm-kusto/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import {
env,
record,
RecorderEnvironmentSetup,
Recorder
} from "@azure-tools/test-recorder";
import * as assert from "assert";

const recorderEnvSetup: RecorderEnvironmentSetup = {
replaceableVariables: {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
},
customizationsOnRecordings: [
(recording: any): any =>
recording.replace(
/"access_token":"[^"]*"/g,
`"access_token":"access_token"`
)
],
queryParametersToSkip: []
};

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

beforeEach(async function() {
recorder = record(this, recorderEnvSetup);
});

afterEach(async function() {
await recorder.stop();
});

it("sample test", async function() {
console.log("Hi, I'm a test!");
});
});

0 comments on commit b0c8011

Please sign in to comment.