diff --git a/.github/workflows/openapi_validation.yaml b/.github/workflows/openapi_validation.yaml new file mode 100644 index 00000000..8e050b8e --- /dev/null +++ b/.github/workflows/openapi_validation.yaml @@ -0,0 +1,65 @@ +name: Validate OpenAPI + +on: + pull_request: + branches: + - master + - draft + +jobs: + validate_meta: + name: Meta OpenAPI Schema Validation + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for meta.yaml + run: openapi-validator ./api/meta/build/meta.yaml + + validate_registry: + name: Registry OpenAPI Schema Validation + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for registry.yaml + run: openapi-validator ./api/registry/build/registry.yaml + + validate_transaction: + name: Transaction OpenAPI Schema Validation + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for transaction.yaml + run: openapi-validator ./api/transaction/build/transaction.yaml