From 96832b16950019e696c7bb89962cb357af7c8620 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 10 Feb 2022 00:34:36 +0000 Subject: [PATCH] CodeGen from PR 17742 in Azure/azure-rest-api-specs Merge 0e898359e420f9ffd9c267ce8e9ee3bc7b1f3b56 into c858f22f4bcc7e0c0e6a1c235cc01ca880b6c4ec --- common/config/rush/pnpm-lock.yaml | 17 ++++--- sdk/mediaservices/arm-mediaservices/LICENSE | 2 +- sdk/mediaservices/arm-mediaservices/README.md | 2 +- .../arm-mediaservices/_meta.json | 6 +-- .../arm-mediaservices/api-extractor.json | 25 +++++++--- .../arm-mediaservices/package.json | 8 ++-- .../src/azureMediaServices.ts | 2 +- .../arm-mediaservices/src/models/mappers.ts | 1 + .../arm-mediaservices/test/sampleTest.ts | 48 +++++++++++++++++++ .../arm-mediaservices/tsconfig.json | 16 +++++-- 10 files changed, 98 insertions(+), 29 deletions(-) create mode 100644 sdk/mediaservices/arm-mediaservices/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index b72b191a22aa..76e1a843368a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10871,22 +10871,22 @@ packages: dev: false file:projects/arm-mediaservices.tgz: - resolution: {integrity: sha512-Z4sbFbr1f8b8N3pjTST4ForUIBgtVkPwucOdkX9C4kFMbjO4asJYZ//VvU4hYCdWmVzV9XoXSWc9E/x1iZ98zg==, tarball: file:projects/arm-mediaservices.tgz} + resolution: {integrity: sha512-F8O2XQ9PlyZo61/j0AJnv79/UtvW4vie3jIzD5jINbSVB61hLvFNsfkLQIekN8V0mQzmaEHOth+U+WyNvnHrVg==, tarball: file:projects/arm-mediaservices.tgz} name: '@rush-temp/arm-mediaservices' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -13912,7 +13912,7 @@ packages: dev: false file:projects/eventgrid.tgz: - resolution: {integrity: sha512-cRipNDlfS0co7HptArkxqp6lbNAffyBqpvSVSDhMe/ZR5cBJs6ywzCsV/QxHhxBpp6Z7p5To9h98IYOOIhMp+A==, tarball: file:projects/eventgrid.tgz} + resolution: {integrity: sha512-5cMNL6d3puoJz7tLWxl1yyAwtd3EI7uAMvn+q3AAyZHJFG7WdS3l7IfCL8i8LD2qvRdpRJxm88jqVsLU3oA+Eg==, tarball: file:projects/eventgrid.tgz} name: '@rush-temp/eventgrid' version: 0.0.0 dependencies: @@ -13960,7 +13960,6 @@ packages: - '@swc/wasm' - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false diff --git a/sdk/mediaservices/arm-mediaservices/LICENSE b/sdk/mediaservices/arm-mediaservices/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/mediaservices/arm-mediaservices/LICENSE +++ b/sdk/mediaservices/arm-mediaservices/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/mediaservices/arm-mediaservices/README.md b/sdk/mediaservices/arm-mediaservices/README.md index 996e2e3a01d4..b08098054c19 100644 --- a/sdk/mediaservices/arm-mediaservices/README.md +++ b/sdk/mediaservices/arm-mediaservices/README.md @@ -6,7 +6,7 @@ This Swagger was generated by the API Framework. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mediaservices/arm-mediaservices) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-mediaservices) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-mediaservices) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-mediaservices?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/mediaservices/arm-mediaservices/_meta.json b/sdk/mediaservices/arm-mediaservices/_meta.json index 39e8f420677d..492dd386bd19 100644 --- a/sdk/mediaservices/arm-mediaservices/_meta.json +++ b/sdk/mediaservices/arm-mediaservices/_meta.json @@ -1,7 +1,7 @@ { - "commit": "b8cae07c799a07f2e779a9e301f639e9b85124b1", + "commit": "8b21ba204a66685384f1ae8e06e9ed23568714e7", "readme": "specification/mediaservices/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.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/mediaservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.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/mediaservices/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.20211130.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/api-extractor.json b/sdk/mediaservices/arm-mediaservices/api-extractor.json index a487200f1286..4329d45e7e38 100644 --- a/sdk/mediaservices/arm-mediaservices/api-extractor.json +++ b/sdk/mediaservices/arm-mediaservices/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-mediaservices.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index b464713d3840..476b4fc9c4c3 100644 --- a/sdk/mediaservices/arm-mediaservices/package.json +++ b/sdk/mediaservices/arm-mediaservices/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureMediaServices.", - "version": "10.0.1", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-mediaservices.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -99,4 +99,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts index 456ab97103b6..3c435728ede4 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts @@ -78,7 +78,7 @@ export class AzureMediaServices extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mediaservices/1.0.0`; + const packageDetails = `azsdk-js-arm-mediaservices/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts index 12a18b8c6604..6394b8b3b85f 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts @@ -236,6 +236,7 @@ export const MetricSpecification: coreClient.CompositeMapper = { lockAggregationType: { serializedName: "lockAggregationType", readOnly: true, + nullable: true, type: { name: "String" } diff --git a/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts b/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts @@ -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!"); + }); +}); diff --git a/sdk/mediaservices/arm-mediaservices/tsconfig.json b/sdk/mediaservices/arm-mediaservices/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/mediaservices/arm-mediaservices/tsconfig.json +++ b/sdk/mediaservices/arm-mediaservices/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file