using beckn npm package for openapi validation in github action #3
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: Validate OpenAPI Schema | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- draft | ||
jobs: | ||
validate_openapi_schema_meta: | ||
name: Validate OpenAPI Schema for Meta | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install Node | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
cache: 'npm' | ||
- run: npm install -g beckn-spec-validator | ||
- run: beckn-spec-validator -b api/meta/build/meta.yaml -v false | ||
validate_openapi_schema_registry: | ||
name: Validate OpenAPI Schema for registry | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install Node | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
cache: 'npm' | ||
- run: npm install -g beckn-spec-validator | ||
- run: beckn-spec-validator -b api/registry/build/registry.yaml -v false | ||
validate_openapi_schema_transaction: | ||
name: Validate OpenAPI Schema for transaction | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install Node | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
cache: 'npm' | ||
- run: npm install -g beckn-spec-validator | ||
- run: beckn-spec-validator -b api/transaction/build/transaction.yaml -v false |