Merge pull request #719 from microsoftgraph/schemas/metadata-publishi… #1368
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OpenAPI Parser Validation for latest OpenAPI docs | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
list-conversion-settings: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-conversion-settings.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set-conversion-settings | |
run: echo "::set-output name=matrix::$(ls conversion-settings/*.json | sed 's/.*\///' | sed 's/\.[^.]*$//' | jq -R -s -c 'split("\n")[:-1]')" | |
build: | |
needs: list-conversion-settings | |
strategy: | |
matrix: | |
version: ["v1.0", "beta"] | |
settings: ${{ fromJson(needs.list-conversion-settings.outputs.matrix) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4.1.0 | |
with: | |
dotnet-version: 8.0.x | |
- name: Validate latest OpenAPI docs | |
run: ./scripts/run-openapi-validation.ps1 -repoDirectory "${{ github.workspace }}" -version "${{ matrix.version }}" -platformName "${{ matrix.settings }}" | |
shell: pwsh | |
- name: Validate description with redocly | |
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' |