Initial OpenAPI spec setup #55
This file contains hidden or 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: Validate OpenAPI Specs | |
| on: | |
| push: | |
| paths: | |
| - 'components/**.yaml' | |
| - 'services/**.yaml' | |
| - 'responses/**.yaml' | |
| pull_request: | |
| paths: | |
| - 'components/**.yaml' | |
| - 'services/**.yaml' | |
| - 'responses/**.yaml' | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Install swagger-cli | |
| run: npm install -g swagger-cli | |
| - name: Validate OpenAPI spec | |
| run: | | |
| swagger-cli validate main.yaml --verbose |