Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds kiota dom export generation #1254

Merged
merged 7 commits into from
Aug 29, 2024
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
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
Loading