diff --git a/.github/workflows/openapi_validation.yml b/.github/workflows/openapi_validation.yml new file mode 100644 index 00000000..c454386e --- /dev/null +++ b/.github/workflows/openapi_validation.yml @@ -0,0 +1,27 @@ +name: Validate OpenAPI Schema + +on: + pull_request: + branches: + - master + +jobs: + validate_openapi_schema: + name: Validate OpenAPI Schema + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Validate OpenAPI schema + uses: thiyagu06/openapi-validator-action@v1 + with: + filepath: "./api/meta/build/meta.yaml" + + - name: Check validation status + run: | + if [ "${{ steps.validation.outcome }}" == 'failure' ]; then + echo "OpenAPI validation failed. Blocking the pull request merge." + exit 1 + fi diff --git a/api/meta/build/meta.yaml b/api/meta/build/meta.yaml index 4992bd2a..b45bbaef 100644 --- a/api/meta/build/meta.yaml +++ b/api/meta/build/meta.yaml @@ -93,7 +93,7 @@ paths: $ref: '#/paths/~1return_reasons/post/responses/default' /return_reasons: post: - tags: + tags:fa fasdf asf asf a - Beckn Application Platform (BPP) description: BPP provides the list of return reasons to the BAP requestBody: