Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions sdk/apimanagement/arm-apimanagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ npm install @azure/ms-rest-nodeauth
##### Sample code

```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as coreHttp from "@azure/core-http";
import * as coreArm from "@azure/core-arm";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { ApiManagementClient, ApiManagementModels, ApiManagementMappers } from "@azure/arm-apimanagement";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
Expand Down Expand Up @@ -68,8 +68,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
<html lang="en">
<head>
<title>@azure/arm-apimanagement sample</title>
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/@azure/core-http/dist/coreHttp.browser.js"></script>
<script src="node_modules/@azure/core-arm/dist/coreArm.js"></script>
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/arm-apimanagement/dist/arm-apimanagement.js"></script>
<script type="text/javascript">
Expand Down Expand Up @@ -108,3 +108,5 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
## Related projects

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/apimanagement/arm-apimanagement/README.png)
10 changes: 5 additions & 5 deletions sdk/apimanagement/arm-apimanagement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "ApiManagementClient Library with typescript type definitions for node.js and browser.",
"version": "5.1.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"@azure/core-arm": "^1.0.0-preview.1",
"@azure/core-http": "^1.0.0-preview.1",
"tslib": "^1.9.3"
},
"keywords": [
Expand All @@ -26,13 +26,13 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
},
"homepage": "https://github.com/azure/azure-sdk-for-js",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/apimanagement/arm-apimanagement",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-js.git"
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-js/issues"
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
Expand Down
8 changes: 4 additions & 4 deletions sdk/apimanagement/arm-apimanagement/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import sourcemaps from "rollup-plugin-sourcemaps";
const config = {
input: "./esm/apiManagementClient.js",
external: [
"@azure/ms-rest-js",
"@azure/ms-rest-azure-js"
"@azure/core-http",
"@azure/core-arm"
],
output: {
file: "./dist/arm-apimanagement.js",
format: "umd",
name: "Azure.ArmApimanagement",
sourcemap: true,
globals: {
"@azure/ms-rest-js": "msRest",
"@azure/ms-rest-azure-js": "msRestAzure"
"@azure/core-http": "coreHttp",
"@azure/core-arm": "coreArm"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "@azure/ms-rest-js";
import * as coreHttp from "@azure/core-http";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as operations from "./operations";
Expand Down Expand Up @@ -86,7 +86,7 @@ class ApiManagementClient extends ApiManagementClientContext {
* subscription. The subscription ID forms part of the URI for every service call.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApiManagementClientOptions) {
constructor(credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, subscriptionId: string, options?: Models.ApiManagementClientOptions) {
super(credentials, subscriptionId, options);
this.api = new operations.Api(this);
this.apiRevision = new operations.ApiRevision(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
*/

import * as Models from "./models";
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as coreHttp from "@azure/core-http";
import * as coreArm from "@azure/core-arm";

const packageName = "@azure/arm-apimanagement";
const packageVersion = "5.1.0";

export class ApiManagementClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
export class ApiManagementClientContext extends coreArm.AzureServiceClient {
credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials;
apiVersion?: string;
subscriptionId: string;

Expand All @@ -27,7 +27,7 @@ export class ApiManagementClientContext extends msRestAzure.AzureServiceClient {
* subscription. The subscription ID forms part of the URI for every service call.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApiManagementClientOptions) {
constructor(credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, subscriptionId: string, options?: Models.ApiManagementClientOptions) {
if (credentials == undefined) {
throw new Error('\'credentials\' cannot be null.');
}
Expand All @@ -39,7 +39,7 @@ export class ApiManagementClientContext extends msRestAzure.AzureServiceClient {
options = {};
}
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
const defaultUserAgent = coreArm.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

Expand Down
Loading