-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support sample.env generation in rlc-common for typespec-ts (#2845)
* Support sample.env generation in rlc-common for typespec-ts * lint fix * update * update * update * update * Update index.ts * Update buildSampleEnvFile.ts * update --------- Co-authored-by: Mary Gao <yanmeigao1210@gmail.com>
- Loading branch information
1 parent
6a05181
commit 8033f60
Showing
39 changed files
with
62 additions
and
78 deletions.
There are no files selected for viewing
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/src/generators/samples/sampleEnv.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/integration/generated/additionalProperties/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/integration/generated/datasearch/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/integration/generated/patterntest/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/rlcIntegration/generated/dpgCustomization/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/rlcIntegration/generated/headerRest/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/rlcIntegration/generated/mediaTypesRest/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
...ages/autorest.typescript/test/rlcIntegration/generated/multipleInheritanceRest/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
...ges/autorest.typescript/test/smoke/generated/arm-package-subscriptions-2019-06/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/compute-resource-manager/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/keyvault-resource-manager/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/msi-resource-manager/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/network-resource-manager/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/sql-resource-manager/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/storage-resource-manager/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
5 changes: 1 addition & 4 deletions
5
packages/autorest.typescript/test/smoke/generated/web-resource-manager/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# App registration secret for AAD authentication | ||
AZURE_CLIENT_SECRET= | ||
AZURE_CLIENT_ID= | ||
AZURE_TENANT_ID= | ||
# Feel free to add your own environment variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
import { RLCModel } from "../interfaces.js"; | ||
|
||
const sampleEnvText = ` | ||
# Feel free to add your own environment variables. | ||
`; | ||
|
||
export function buildSampleEnvFile(model: RLCModel) { | ||
if ( | ||
(model.options?.generateMetadata === true || | ||
model.options?.generateSample === true) && | ||
model.options?.flavor === "azure" | ||
) { | ||
const filePath = "sample.env"; | ||
return { | ||
path: filePath, | ||
content: sampleEnvText.trim() | ||
}; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/anomalyDetector/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/authoring/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/batch_modular/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/confidentialLedger/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/contentsafety_modular/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/eventgrid_modular/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/faceai/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
...ages/typespec-test/test/healthInsights_radiologyinsights/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/healthInsights_trialmatcher/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/loadTest/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/openai/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/parametrizedHost/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/schemaRegistry/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/spread/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/translator/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
1 change: 1 addition & 0 deletions
1
packages/typespec-test/test/widget_dpg/generated/typespec-ts/sample.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Feel free to add your own environment variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters