Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions eng/Generate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,8 @@ function Add-TestServer-Swagger ([string]$testName, [string]$projectSuffix, [str

function Add-CadlRanch-Cadl([string]$testName, [string]$projectPrefix, [string]$cadlRanchProjectsDirectory) {
$projectDirectory = Join-Path $cadlRanchProjectsDirectory $testName
$cadlFolders = Get-ChildItem -Path $cadlRanchFilePath -Depth 2 -Directory $testName
if ($cadlFolders) {
$cadlFolder = $cadlFolders[0]
$cadlMain = Join-Path $cadlFolder "main.cadl"
Add-Cadl "$projectPrefix$testName" $projectDirectory $cadlMain "--option @azure-tools/cadl-csharp.generateConvenienceAPI=true --option @azure-tools/cadl-csharp.unreferenced-types-handling=keepAll"
}
$cadlMain = Join-Path $cadlRanchFilePath $testName "main.cadl"
Add-Cadl "$projectPrefix$testName" $projectDirectory $cadlMain "--option @azure-tools/cadl-csharp.generateConvenienceAPI=true --option @azure-tools/cadl-csharp.unreferenced-types-handling=keepAll"
}

$testNames =
Expand Down Expand Up @@ -256,17 +252,17 @@ if (!($Exclude -contains "Samples"))

# Cadl projects
$cadlRanchProjectDirectory = Join-Path $repoRoot 'test' 'CadlRanchProjects'
$cadlRanchProjectNames =
'api-key',
'oauth2',
'property-optional',
'property-types'
$cadlRanchProjectPaths =
'authentication/api-key',
'authentication/oauth2',
'models/property-optional',
'models/property-types'

if (!($Exclude -contains "CadlRanchProjects"))
{
foreach ($testName in $cadlRanchProjectNames)
foreach ($testPath in $cadlRanchProjectPaths)
{
Add-CadlRanch-Cadl $testName "cadl-" $cadlRanchProjectDirectory
Add-CadlRanch-Cadl $testPath "cadl-" $cadlRanchProjectDirectory
}
}

Expand Down
16 changes: 8 additions & 8 deletions src/AutoRest.CSharp/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,21 @@
"commandName": "Project",
"commandLineArgs": "--standalone $(SolutionDir)\\test\\TestProjects\\BodyAndPath-LowLevel\\Generated"
},
"cadl-api-key": {
"cadl-authentication/api-key": {
"commandName": "Project",
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\api-key\\Generated"
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\authentication\\api-key\\Generated"
},
"cadl-oauth2": {
"cadl-authentication/oauth2": {
"commandName": "Project",
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\oauth2\\Generated"
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\authentication\\oauth2\\Generated"
},
"cadl-property-optional": {
"cadl-models/property-optional": {
"commandName": "Project",
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\property-optional\\Generated"
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\models\\property-optional\\Generated"
},
"cadl-property-types": {
"cadl-models/property-types": {
"commandName": "Project",
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\property-types\\Generated"
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\models\\property-types\\Generated"
},
"ClientAndOperationGroup-Cadl": {
"commandName": "Project",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.