Skip to content

Commit

Permalink
test auto generating OpenApi Spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ShankarSinghC committed Oct 5, 2023
1 parent b5cc748 commit ab0aff3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/validate-openapi-spec.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Validate Generated OpenAPI Spec File

on:
pull_request:

push:
branches: auto-generate-openapi_spec
merge_group:
types:
- checks_requested
Expand Down Expand Up @@ -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: |
Expand Down
1 change: 0 additions & 1 deletion crates/router/src/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ab0aff3

Please sign in to comment.