diff --git a/.github/workflows/validate-openapi-spec.yml b/.github/workflows/validate-openapi-spec.yml index 5c4c28518e67..9a4680bae770 100644 --- a/.github/workflows/validate-openapi-spec.yml +++ b/.github/workflows/validate-openapi-spec.yml @@ -1,8 +1,8 @@ name: Validate Generated OpenAPI Spec File on: - pull_request: - + push: + branches: auto-generate-openapi_spec merge_group: types: - checks_requested @@ -47,6 +47,19 @@ jobs: shell: bash run: swagger-cli validate ./openapi/openapi_spec.json + - name: Commit the JSON file if it is not up-to-date + # PR originated from same repository + if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }} + shell: bash + run: | + if ! git diff --quiet --exit-code -- openapi/openapi_spec.json ; then + git config --local user.name 'github-actions[bot]' + git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add openapi/openapi_spec.json + git commit --message 'docs(openapi): re-generate OpenAPI specification' + git push + fi + - name: Fail check if the JSON file is not up-to-date shell: bash run: | diff --git a/crates/router/src/openapi.rs b/crates/router/src/openapi.rs index a0f8643be3ec..d10cb6c1884b 100644 --- a/crates/router/src/openapi.rs +++ b/crates/router/src/openapi.rs @@ -283,7 +283,6 @@ Never share your secret api keys. Keep them guarded and secure. api_models::payments::DokuBillingDetails, api_models::payments::BankTransferInstructions, api_models::payments::ReceiverDetails, - api_models::payments::AchTransfer, api_models::payments::MultibancoTransferInstructions, api_models::payments::DokuBankTransferInstructions, api_models::payments::ApplePayRedirectData,