File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
.azure-pipelines/generation-templates Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ parameters:
4848 type : boolean
4949 default : true
5050
51+ - name : pathExclusionArguments
52+ type : string
53+ default : " -e '/copilot' -e '/copilot/**'"
54+
5155steps :
5256- template : set-up-for-generation-kiota.yml
5357 parameters :
8286 BranchName : ${{ parameters.branchName }}
8387 workingDirectory : ${{ parameters.repoName }}
8488
85- - bash : ' $(kiotaDirectory)/kiota generate --openapi $(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml --language ${{ parameters.language }} -o $(kiotaDirectory)/output -n ${{ parameters.targetNamespace }} -c ${{ parameters.targetClassName }} ${{ parameters.customArguments }}'
89+ - bash : ' $(kiotaDirectory)/kiota generate --openapi $(Build.SourcesDirectory)/msgraph-metadata/${{ parameters.cleanMetadataFolder }}/openapi.yaml --language ${{ parameters.language }} -o $(kiotaDirectory)/output -n ${{ parameters.targetNamespace }} -c ${{ parameters.targetClassName }} ${{ parameters.customArguments }} ${{ parameters.pathExclusionArguments }} '
8690 displayName : ' Run Kiota for ${{ parameters.language }} ${{ parameters.version }}'
8791 env :
8892 KIOTA_GENERATION:EXPORTPUBLICAPI : ${{ parameters.exportDom }}
Original file line number Diff line number Diff line change @@ -18,8 +18,13 @@ Invoke-Expression "$PSScriptRoot\remove-typescript-fluent-api-from-main-package.
1818$packagesDirectories = Get-ChildItem $targetDirectory - Directory - Exclude $mainPackageDirectoryName | Where-Object { -not ($_.Name.EndsWith (" -tests" )) }
1919foreach ($directory in $packagesDirectories ) {
2020 $fluentAPISegmentName = $directory.Name.Replace (" $mainPackageDirectoryName -" , " " )
21- Copy-Item (Join-Path $sourceDirectory - ChildPath $fluentAPISegmentName ) - Destination $directory.FullName - Recurse - Force
22- Invoke-Expression " $PSScriptRoot \fix-typescript-fluent-packages-imports.ps1 -targetDirectory $ ( $directory.FullName ) -packageName $packageName "
21+ if (Test-Path - Path (Join-Path $sourceDirectory - ChildPath $fluentAPISegmentName )) {
22+ Copy-Item (Join-Path $sourceDirectory - ChildPath $fluentAPISegmentName ) - Destination $directory.FullName - Recurse - Force
23+ Invoke-Expression " $PSScriptRoot \fix-typescript-fluent-packages-imports.ps1 -targetDirectory $ ( $directory.FullName ) -packageName $packageName "
24+ }
25+ else {
26+ Write-Host " Skipping the fluent API segment: $fluentAPISegmentName as it does not exist in the generated models" - ForegroundColor Yellow
27+ }
2328}
2429
2530Write-Host " Copied the generated files into the repo. From: $sourceDirectory to: $targetDirectory " - ForegroundColor Green
You can’t perform that action at this time.
0 commit comments