Skip to content

Commit

Permalink
Fix the Samples URL (#1098)
Browse files Browse the repository at this point in the history
* Fix the Samples URL

* Smoke test changes
  • Loading branch information
sarangan12 committed Jul 9, 2021
1 parent 357d655 commit f986e6e
Show file tree
Hide file tree
Showing 90 changed files with 104 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/generators/static/readmeFileGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ function createMetadata(
packageDetails: PackageDetails,
clientDetails: ClientDetails,
azureOutputDirectory?: string,
addCredentials?: boolean
addCredentials?: boolean,
azureArm?: boolean
): Metadata {
const azureHuh = packageDetails.scopeName === "azure";
const repoURL = azureHuh
Expand Down Expand Up @@ -102,7 +103,9 @@ function createMetadata(
relativePackageSourcePath: relativePackageSourcePath,
repoURL: repoURL,
packageSourceURL: packageSourceURL,
samplesURL: packageSourceURL && `${packageSourceURL}/samples`,
samplesURL: azureArm
? `https://github.com/Azure-Samples/azure-samples-js-management`
: packageSourceURL && `${packageSourceURL}/samples`,
impressionURL: azureHuh
? packageParentDirectoryName &&
packageDirectoryName &&
Expand All @@ -129,7 +132,8 @@ export function generateReadmeFile(
packageDetails,
azureOutputDirectory,
generateMetadata,
addCredentials
addCredentials,
azureArm
} = getAutorestOptions();

if (!generateMetadata) {
Expand All @@ -140,7 +144,8 @@ export function generateReadmeFile(
packageDetails,
clientDetails,
azureOutputDirectory,
addCredentials
addCredentials,
azureArm
);
const file = fs.readFileSync(path.join(__dirname, "README.md.hbs"), {
encoding: "utf-8"
Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/additionalProperties/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/additional-properties) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/appconfiguration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f


[Package (NPM)](https://www.npmjs.com/package/appconfiguration) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f


[Package (NPM)](https://www.npmjs.com/package/appconfiguration) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/arrayConstraints/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f


[Package (NPM)](https://www.npmjs.com/package/array-constraints-client) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/attestation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Describes the interface for the per-tenant enclave service.

[Package (NPM)](https://www.npmjs.com/package/attestation) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/azure-parameter-grouping) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/azureReport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/zzzAzureReport) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/azure-special-properties) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyArray/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest Swagger BAT

[Package (NPM)](https://www.npmjs.com/package/body-array) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyBoolean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-boolean) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyBooleanQuirks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-boolean-quirks) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyByte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest Swagger BAT

[Package (NPM)](https://www.npmjs.com/package/body-byte) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyComplex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-complex) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-complex-tracing) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyDate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-date) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyDateTime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-datetime) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyDateTimeRfc1123/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-datetime-rfc1123) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyDictionary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest Swagger BAT

[Package (NPM)](https://www.npmjs.com/package/body-dictionary) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyDuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-duration) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyFile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest Swagger BAT

[Package (NPM)](https://www.npmjs.com/package/body-file) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyFormData/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest Swagger BAT

[Package (NPM)](https://www.npmjs.com/package/body-formdata) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyInteger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-integer) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyNumber/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-number) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyString/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest Swagger BAT

[Package (NPM)](https://www.npmjs.com/package/body-string) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/bodyTime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/body-time) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/constantParam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview">https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview</a>

[Package (NPM)](https://www.npmjs.com/package/constantParam) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/customUrl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/custom-url) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/customUrlMoreOptions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/custom-url-MoreOptions) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/customUrlPaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/custom-url-paging) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/extensibleEnums/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
PetStore

[Package (NPM)](https://www.npmjs.com/package/extensible-enums) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/header/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/header) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/headerprefix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f


[Package (NPM)](https://www.npmjs.com/package/headerprefix) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/httpInfrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/httpInfrastructure) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/iotspaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Use this API to manage the IoTSpaces service instances in your Azure subscription.

[Package (NPM)](https://www.npmjs.com/package/iotspaces) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/licenseHeader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f


[Package (NPM)](https://www.npmjs.com/package/license-header) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/lro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Long-running Operation for AutoRest

[Package (NPM)](https://www.npmjs.com/package/lro) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Test Infrastructure for AutoRest

[Package (NPM)](https://www.npmjs.com/package/lro-parameterized-endpoints) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/mapperrequired/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
The key vault client performs cryptographic key operations and vault operations against the Key Vault service.

[Package (NPM)](https://www.npmjs.com/package/mapperrequired) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/mediaTypes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Play with produces/consumes and media-types in general.

[Package (NPM)](https://www.npmjs.com/package/media-types-service) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/mediaTypesV3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f


[Package (NPM)](https://www.npmjs.com/package/media-types-v3-client) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/mediaTypesV3Lro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f


[Package (NPM)](https://www.npmjs.com/package/media-types-v3-lro-client) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/mediaTypesWithTracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Play with produces/consumes and media-types in general.

[Package (NPM)](https://www.npmjs.com/package/media-types-service-tracing) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/modelFlattening/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Resource Flattening for AutoRest

[Package (NPM)](https://www.npmjs.com/package/model-flattening) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
1 change: 1 addition & 0 deletions test/integration/generated/multipleInheritance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
Service client for multiinheritance client testing

[Package (NPM)](https://www.npmjs.com/package/multiple-inheritance) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started

Expand Down
Loading

0 comments on commit f986e6e

Please sign in to comment.