Skip to content

Commit

Permalink
Merge pull request #1254 from microsoftgraph/feature/export-dom
Browse files Browse the repository at this point in the history
feat: adds kiota dom export generation
  • Loading branch information
baywet authored Aug 29, 2024
2 parents c633ea7 + 7c0f37d commit 8970a4e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .azure-pipelines/generation-templates/java-kiota.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ steps:
BuildConfiguration: $(buildConfiguration)
OutputFullPath: $(kiotaDirectory)/output/${{ parameters.namespacePath }}/*
RepoModelsDir: $(Build.SourcesDirectory)/${{ parameters.repoName }}/src/main/java/${{ parameters.namespacePath }}/generated/

- pwsh: |
Move-Item -Path "*.txt","*.json" -Destination "$(Build.SourcesDirectory)/${{ parameters.repoName }}/src/main/java/${{ parameters.namespacePath }}/generated/"
displayName: Move kiota specific metadata to expected location (txt for export file, json for lock or workspace file)
workingDirectory: $(kiotaDirectory)/output/
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ parameters:
type: string
default: ''

- name: exportDom
type: boolean
default: true

steps:
- template: set-up-for-generation-kiota.yml
parameters:
Expand Down Expand Up @@ -80,6 +84,8 @@ steps:

- 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 }}'
displayName: 'Run Kiota for ${{ parameters.language }} ${{ parameters.version }}'
env:
KIOTA_GENERATION:EXPORTPUBLICAPI: ${{ parameters.exportDom }}

- ${{ parameters.languageSpecificSteps }}

Expand Down
6 changes: 6 additions & 0 deletions .azure-pipelines/generation-templates/typescript-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ steps:
- pwsh : $(Build.SourcesDirectory)/${{ parameters.repoName }}/scripts/incrementMinorVersion.ps1
displayName: 'Increment minor version number'
workingDirectory: '$(Build.SourcesDirectory)/${{ parameters.repoName }}/scripts'


- pwsh: |
Move-Item -Path "*.txt","*.json" -Destination "$(Build.SourcesDirectory)/${{ parameters.repoName }}/packages/"
displayName: Move kiota specific metadata to expected location (txt for export file, json for lock or workspace file)
workingDirectory: $(kiotaDirectory)/output/
2 changes: 1 addition & 1 deletion scripts/copy-typescript-sdk-models.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ foreach ($directory in $packagesDirectories) {
Invoke-Expression "$PSScriptRoot\fix-typescript-fluent-packages-imports.ps1 -targetDirectory $($directory.FullName) -packageName $packageName"
}

Write-Host "Copied the generated files into the repo. From: $env:OutputFullPath to: $env:RepoModelsDir" -ForegroundColor Green
Write-Host "Copied the generated files into the repo. From: $sourceDirectory to: $targetDirectory" -ForegroundColor Green

0 comments on commit 8970a4e

Please sign in to comment.