Skip to content

Commit 03457da

Browse files
authored
set up auth sync openapi for sdk (#514)
1 parent 3536615 commit 03457da

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/sync-openapi.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Sync OpenAPI Specs # can be customized
2+
on: # additional custom triggers can be configured, examples below
3+
workflow_dispatch: # manual dispatch
4+
push:
5+
branches:
6+
- main # on push to main
7+
schedule:
8+
- cron: '0 3 * * *' # everyday at 3:00 AM UTC
9+
10+
jobs:
11+
update-from-source:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
token: ${{ secrets.OPENAPI_SYNC_TOKEN }}
17+
- name: Update API with Fern
18+
uses: fern-api/sync-openapi@v2
19+
with:
20+
update_from_source: true
21+
token: ${{ secrets.OPENAPI_SYNC_TOKEN }}
22+
branch: 'update-api'
23+
auto_merge: false # you MUST use auto_merge: true with branch: main
24+
add_timestamp: true

fern/generators.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ api:
44
specs:
55
- openapi: ../docs/api-reference/openapi.json
66
overrides: overrides.yml
7+
origin: https://api.klavis.ai/openapi.json # URL to fetch latest spec from
78

89
groups:
910
python-sdk:

0 commit comments

Comments
 (0)