Skip to content

Linting OpenAPI spec with Vacuum #35

Linting OpenAPI spec with Vacuum

Linting OpenAPI spec with Vacuum #35

Workflow file for this run

name: Vacuum OpenAPI Linting
run-name: Linting OpenAPI spec with Vacuum
on: push
jobs:
vacuum-lint:
name: Vacuum OpenAPI Linting
if: github.repository != 'mycloudnexus/cc-api-sandbox'
runs-on: ubuntu-24.04
container: dshanley/vacuum:v0.13.1
steps:
- uses: actions/checkout@v4
- name: Generate Vacuum HTML Reports
run: mkdir -p reports; for FILEPATH in specs/ccapi*.json; do FILE="$(echo $FILEPATH | cut -d '/' -f2 | cut -d '.' -f1)"; vacuum html-report "${FILEPATH}" "reports/report-${FILE}.html"; done
shell: bash
- name: Archive Vacuum HTML Reports
uses: actions/upload-artifact@v4
with:
name: Vacuum HTML Reports
path: reports/*.html
- name: Lint with Vacuum
# Ignoring failures because there are errors that likely can't be fixed any time soon.
run: vacuum lint specs/ccapi* || true
shell: bash