Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into andrueastman/tempor…
Browse files Browse the repository at this point in the history
…aryMetadataFix
  • Loading branch information
andrueastman committed Sep 26, 2024
2 parents afefc8d + a3fa050 commit 777e7e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/metadata-parser-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
uses: fluximus-prime/redocly-cli-github-action@v1
continue-on-error: true # temporary workaround since our descriptions are invalid at the moment
with:
args: 'lint openapi/${{ matrix.version }}/${{ matrix.settings }}.yaml --skip-rule operation-4xx-response --skip-rule no-server-trailing-slash --skip-rule no-unused-components --skip-rule security-defined --skip-rule info-license-url --skip-rule info-license --skip-rule no-empty-servers --skip-rule operation-summary --skip-rule tag-description --max-problems 1000'
args: 'lint transformed_${{ matrix.version }}_${{ matrix.settings }}_metadata.yml --skip-rule operation-4xx-response --skip-rule no-server-trailing-slash --skip-rule no-unused-components --skip-rule security-defined --skip-rule info-license-url --skip-rule info-license --skip-rule no-empty-servers --skip-rule operation-summary --skip-rule tag-description --max-problems 1000'

- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.version }}-${{ matrix.settings }}
path: openapi/${{ matrix.version }}/${{ matrix.settings }}.yaml
path: transformed_${{ matrix.version }}_${{ matrix.settings }}_metadata.yml
2 changes: 1 addition & 1 deletion scripts/run-metadata-validation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ $conversionSettingsDirectory = Join-Path $repoDirectory "conversion-settings"
$snapshot = Join-Path $repoDirectory "schemas" "annotated-$($version)-Prod.csdl"

$transformed = Join-Path $repoDirectory "transformed_$($version)_metadata.xml"
$yamlFilePath = Join-Path $repoDirectory "transformed_$($version)_$($platformName)_metadata.yml"

try {
Write-Host "Tranforming $snapshot metadata using xslt with parameters used in the OpenAPI flow..." -ForegroundColor Green
& $transformScript -xslPath $xsltPath -inputPath $snapshot -outputPath $transformed -addInnerErrorDescription $true -removeCapabilityAnnotations $false -csdlVersion $version

Write-Host "Validating $transformed metadata after the transform..." -ForegroundColor Green
& dotnet tool install Microsoft.OpenApi.Hidi -g --prerelease
$yamlFilePath = "$transformed.yaml"
& hidi transform --cs $transformed -o $yamlFilePath --co -f Yaml --sp "$conversionSettingsDirectory/$platformName.json"

} catch {
Expand Down

0 comments on commit 777e7e8

Please sign in to comment.