Skip to content

Commit

Permalink
update MGC generate script to set tspConfig (#3886)
Browse files Browse the repository at this point in the history
Fix #3884
Problem-to-resolve: The tspConfig.yaml in test projects does not take
effect.

Solution:
- Set `--config` to refer to the tspConfig.yaml if it exists in
Generate.ps1
- remove tspConfig.yaml in Unbranded-TypeSpec project since we will test
the configuration in ut, and the tspConfig.yaml is useless.
  • Loading branch information
chunyu3 authored Aug 8, 2024
1 parent 50da83e commit 323adb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions packages/http-client-csharp/eng/scripts/Generation.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ function Get-TspCommand {
$command = "npx tsp compile $specFile"
$command += " --trace @typespec/http-client-csharp"
$command += " --emit @typespec/http-client-csharp"
$configFile = Join-Path $generationDir "tspconfig.yaml"
if (Test-Path $configFile) {
$command += " --config=$configFile"
}
$command += " --option @typespec/http-client-csharp.emitter-output-dir=$generationDir"
$command += " --option @typespec/http-client-csharp.save-inputs=true"
if ($generateStub) {
Expand Down

This file was deleted.

0 comments on commit 323adb2

Please sign in to comment.