From 6ce97af19596e27b89708808f70dbc1cd7f131e9 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Wed, 25 Sep 2024 16:00:25 +0300 Subject: [PATCH 1/2] fixCi validation --- .github/workflows/metadata-parser-validation.yml | 2 +- scripts/run-metadata-validation.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/metadata-parser-validation.yml b/.github/workflows/metadata-parser-validation.yml index 9eb854250..30b65600d 100644 --- a/.github/workflows/metadata-parser-validation.yml +++ b/.github/workflows/metadata-parser-validation.yml @@ -49,4 +49,4 @@ jobs: if: always() with: name: ${{ matrix.version }}-${{ matrix.settings }} - path: openapi/${{ matrix.version }}/${{ matrix.settings }}.yaml + path: transformed_${{ matrix.version }}_${{ matrix.settings }}_metadata.yml diff --git a/scripts/run-metadata-validation.ps1 b/scripts/run-metadata-validation.ps1 index 77e2e3fb4..ee041ceb6 100644 --- a/scripts/run-metadata-validation.ps1 +++ b/scripts/run-metadata-validation.ps1 @@ -34,6 +34,7 @@ $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 @@ -41,7 +42,6 @@ try { 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 { From 09770a4b5ca0fcd0e2874767017aa610780717bf Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Wed, 25 Sep 2024 16:12:39 +0300 Subject: [PATCH 2/2] lint the correct file --- .github/workflows/metadata-parser-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/metadata-parser-validation.yml b/.github/workflows/metadata-parser-validation.yml index 30b65600d..135c92643 100644 --- a/.github/workflows/metadata-parser-validation.yml +++ b/.github/workflows/metadata-parser-validation.yml @@ -43,7 +43,7 @@ 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()