Skip to content

Commit

Permalink
tsp - set more default configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
dolauli committed Jan 15, 2025
1 parent a6e2255 commit c9931a6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions packages/typespec-powershell/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ verb-mapping:
Wipe: Clear
Write: Write

# azure configurations
azure: true

# Folder configurations
current-folder: "./"
module-folder: "./generated"
Expand Down Expand Up @@ -243,6 +246,19 @@ nuspec: "./{module-name}.nuspec"
# misc configurations
skip-model-cmdlets: false
module-version: 0.1.0
namespace: "Microsoft.Azure.PowerShell.Cmdlets.{service-name}"
use-namespace-folders: false
help-link-prefix: https://learn.microsoft.com/powershell/module/
metadata:
authors: Microsoft Corporation
owners: Microsoft Corporation
description: 'Microsoft Azure PowerShell: {service-name} cmdlets'
copyright: Microsoft Corporation. All rights reserved.
tags: Azure ResourceManager ARM PSModule {service-name}
companyName: Microsoft Corporation
requireLicenseAcceptance: true
licenseUri: https://aka.ms/azps-license
projectUri: https://github.com/Azure/azure-powershell

# License configurations
header-definitions:
Expand Down
3 changes: 2 additions & 1 deletion packages/typespec-powershell/src/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ function loadConfiguration(emitterOptions: Record<string, any>): Record<string,
const configuration = deserialize<Record<string, any>>(readFileSync(configPath, 'utf8'), configPath);
// Define the values for interpolation
const interpolationValues = {
'module-name': emitterOptions['module-name']
'module-name': emitterOptions['module-name'],
'service-name': emitterOptions['service-name']
};
interpolatePlaceholders(configuration, interpolationValues);
// If there is overlap between the configuration and the emitter options, the emitter options will take precedence
Expand Down

0 comments on commit c9931a6

Please sign in to comment.