From db191633dfd0342f9b573b342783dc059b439796 Mon Sep 17 00:00:00 2001 From: shreyav Date: Tue, 3 Mar 2026 10:34:08 -0800 Subject: [PATCH] [gha] ensure bundled openapi.yaml is in sync --- .github/workflows/dummy.yml | 2 ++ .github/workflows/lint.yml | 2 ++ .github/workflows/openapi-build.yml | 10 ++++++++++ mintlify/openapi.yaml | 2 +- openapi.yaml | 2 +- .../components/schemas/quotes/PurposeOfPayment.yaml | 2 +- 6 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dummy.yml b/.github/workflows/dummy.yml index f2b2d687..f31110b5 100644 --- a/.github/workflows/dummy.yml +++ b/.github/workflows/dummy.yml @@ -4,11 +4,13 @@ on: pull_request: paths-ignore: - 'openapi.yaml' + - 'openapi/**' - 'mintlify/**' - '.markdownlint.json' merge_group: paths-ignore: - 'openapi.yaml' + - 'openapi/**' - 'mintlify/**' - '.markdownlint.json' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bae66112..6dd790e2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,12 +5,14 @@ on: branches: [ main ] paths: - 'openapi.yaml' + - 'openapi/**' - '.markdownlint.json' - 'mintlify/**' pull_request: branches: [ main ] paths: - 'openapi.yaml' + - 'openapi/**' - '.markdownlint.json' - 'mintlify/**' # Allow manual triggering diff --git a/.github/workflows/openapi-build.yml b/.github/workflows/openapi-build.yml index f75a018d..32b36e94 100644 --- a/.github/workflows/openapi-build.yml +++ b/.github/workflows/openapi-build.yml @@ -5,11 +5,13 @@ on: branches: [ main ] paths: - 'openapi.yaml' + - 'openapi/**' - 'mintlify/**' pull_request: branches: [ main ] paths: - 'openapi.yaml' + - 'openapi/**' - 'mintlify/**' # Allow manual triggering workflow_dispatch: @@ -36,3 +38,11 @@ jobs: - name: Build documentation run: make build + + - name: Check compiled OpenAPI is up to date + run: | + if ! git diff --exit-code openapi.yaml mintlify/openapi.yaml; then + echo "ERROR: Compiled openapi.yaml is out of sync with source files in openapi/." + echo "Run 'make build' locally and commit the result." + exit 1 + fi diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 3fac3c13..6bd8645a 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -8261,7 +8261,7 @@ components: description: The side of the quote which should be locked and specified in the `lockedCurrencyAmount`. For example, if I want to send exactly $5 MXN from my wallet, I would set this to "sending", and the `lockedCurrencyAmount` to 500 (in cents). If I want the receiver to receive exactly $10 USD, I would set this to "receiving" and the `lockedCurrencyAmount` to 10000 (in cents). PurposeOfPayment: type: string - description: The purpose of the payment. This may be required when sending to certain geographies such as India. + description: The purpose of the payment. This may be required when sending to certain geographies (e.g. India). enum: - GIFT - SELF diff --git a/openapi.yaml b/openapi.yaml index 3fac3c13..6bd8645a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -8261,7 +8261,7 @@ components: description: The side of the quote which should be locked and specified in the `lockedCurrencyAmount`. For example, if I want to send exactly $5 MXN from my wallet, I would set this to "sending", and the `lockedCurrencyAmount` to 500 (in cents). If I want the receiver to receive exactly $10 USD, I would set this to "receiving" and the `lockedCurrencyAmount` to 10000 (in cents). PurposeOfPayment: type: string - description: The purpose of the payment. This may be required when sending to certain geographies such as India. + description: The purpose of the payment. This may be required when sending to certain geographies (e.g. India). enum: - GIFT - SELF diff --git a/openapi/components/schemas/quotes/PurposeOfPayment.yaml b/openapi/components/schemas/quotes/PurposeOfPayment.yaml index 1064e8b5..2185796a 100644 --- a/openapi/components/schemas/quotes/PurposeOfPayment.yaml +++ b/openapi/components/schemas/quotes/PurposeOfPayment.yaml @@ -1,7 +1,7 @@ type: string description: >- The purpose of the payment. This may be required when sending to certain - geographies such as India. + geographies (e.g. India). enum: - GIFT - SELF