From 874ba576a70eed2c47e9fdcc4e49c3a33d9033d8 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon <67381+philsturgeon@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:33:07 +0000 Subject: [PATCH 1/2] feat: enable retries --- openapi.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index c2d478e..1e2a801 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -30,6 +30,17 @@ servers: description: Production x-internal: false +x-speakeasy-retries: + strategy: backoff + backoff: + initialInterval: 500 # 500 milliseconds + maxInterval: 60000 # 60 seconds + maxElapsedTime: 3600000 # 5 minutes + exponent: 1.5 + statusCodes: + - 5XX + retryConnectionErrors: true + security: - OAuth2: - read From 05961b128c9bde657a0a0fb18d397bd987d281d5 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon <67381+philsturgeon@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:29:48 +0000 Subject: [PATCH 2/2] deploy changes to bump docs --- .github/workflows/bump.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index e1c28d5..5bd97a0 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -18,12 +18,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Add TypeScript SDK Samples to OpenAPI + run: | + npx bump-cli overlay openapi.yaml \\ + https://spec.speakeasy.com/protectearth/protectearth/train-travel-api-typescript-code-samples \\ + > openapi.codegen.yaml + - name: Deploy API documentation uses: bump-sh/github-action@v1 with: doc: train-travel-api token: ${{secrets.BUMP_TOKEN}} - file: openapi.yaml + file: openapi.codegen.yaml api-diff: if: ${{ github.event_name == 'pull_request' }}