Skip to content

Commit 34bb222

Browse files
committed
chore: setup repo
1 parent 56314d0 commit 34bb222

13 files changed

+377
-16
lines changed

.github/workflows/check.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Fern Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
run:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install Fern
17+
run: npm install -g fern-api
18+
19+
- name: Check API is valid
20+
run: fern check

.github/workflows/preview-sdks.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Preview SDKs
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'fern/**'
7+
- 'openapi.json'
8+
- 'openapi-overrides.yml'
9+
10+
jobs:
11+
preview-typescript:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
17+
- name: Setup node
18+
uses: actions/setup-node@v3
19+
20+
- name: Download Fern
21+
run: npm install -g fern-api
22+
23+
- name: Generate Preview
24+
env:
25+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
26+
run: |
27+
fern generate --api v5 --group ts-sdk --preview --log-level debug
28+
29+
- name: Compile
30+
env:
31+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
32+
run: |
33+
cd fern/apis/v5/.preview/fern-typescript-node-sdk
34+
yarn install
35+
yarn build
36+
37+
38+
preview-python:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout repo
42+
uses: actions/checkout@v4
43+
44+
- name: Setup node
45+
uses: actions/setup-node@v3
46+
47+
- name: Download Fern
48+
run: npm install -g fern-api
49+
50+
- name: Preview Python SDK
51+
env:
52+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
53+
run: |
54+
fern generate --api v5 --group python-sdk --preview --log-level debug
55+
56+
- name: Set up python
57+
uses: actions/setup-python@v4
58+
with:
59+
python-version: 3.8
60+
61+
- name: Bootstrap poetry
62+
run: |
63+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
64+
65+
- name: Compile
66+
run: |
67+
cd fern/apis/v5/.preview/fern-python-sdk
68+
poetry install
69+
poetry run mypy .
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release C# SDK
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version of the C# SDK that you would like to release"
8+
required: true
9+
type: string
10+
makePR:
11+
description: Make Pull Request
12+
required: true
13+
default: false
14+
type: boolean
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v3
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v3
25+
26+
- name: Download Fern
27+
run: npm install -g fern-api
28+
29+
- name: Release C# SDK
30+
env:
31+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
32+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
33+
run: |
34+
if ${{ github.event.inputs.makePR }}; then
35+
fern generate --group csharp-sdk --version ${{ inputs.version }} --mode pull-request --log-level debug
36+
else
37+
fern generate --group csharp-sdk --version ${{ inputs.version }} --log-level debug
38+
fi

.github/workflows/release-go-sdk.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release Go SDK
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version of the Go SDK that you would like to release"
8+
required: true
9+
type: string
10+
makePR:
11+
description: Make Pull Request
12+
required: true
13+
default: false
14+
type: boolean
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v3
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v3
25+
26+
- name: Download Fern
27+
run: npm install -g fern-api
28+
29+
- name: Release Go SDK
30+
env:
31+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
32+
run: |
33+
if ${{ github.event.inputs.makePR }}; then
34+
fern generate --group go-sdk --version ${{ inputs.version }} --mode pull-request --log-level debug
35+
else
36+
fern generate --group go-sdk --version ${{ inputs.version }} --log-level debug
37+
fi
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release Java SDK
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version of the Java SDK that you would like to release"
8+
required: true
9+
type: string
10+
makePR:
11+
description: Make Pull Request
12+
required: true
13+
default: false
14+
type: boolean
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v3
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v3
25+
26+
- name: Download Fern
27+
run: npm install -g fern-api
28+
29+
- name: Release Java SDK
30+
env:
31+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
32+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
33+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
34+
run: |
35+
if ${{ github.event.inputs.makePR }}; then
36+
fern generate --group java-sdk --version ${{ inputs.version }} --mode pull-request --log-level debug
37+
else
38+
fern generate --group java-sdk --version ${{ inputs.version }} --log-level debug
39+
fi
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release Python SDK
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version of the Python SDK that you would like to release"
8+
required: true
9+
type: string
10+
makePR:
11+
description: Make Pull Request
12+
required: true
13+
default: false
14+
type: boolean
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v3
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v3
25+
26+
- name: Download Fern
27+
run: npm install -g fern-api
28+
29+
- name: Release Python SDK
30+
env:
31+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
32+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
33+
run: |
34+
if ${{ github.event.inputs.makePR }}; then
35+
fern generate --group python-sdk --version ${{ inputs.version }} --mode pull-request --log-level debug
36+
else
37+
fern generate --group python-sdk --version ${{ inputs.version }} --log-level debug
38+
fi
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release Ruby SDK
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version of the Ruby SDK that you would like to release"
8+
required: true
9+
type: string
10+
makePR:
11+
description: Make Pull Request
12+
required: true
13+
default: false
14+
type: boolean
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v3
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v3
25+
26+
- name: Download Fern
27+
run: npm install -g fern-api
28+
29+
- name: Release Ruby SDK
30+
env:
31+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
32+
run: |
33+
if ${{ github.event.inputs.makePR }}; then
34+
fern generate --group ruby-sdk --version ${{ inputs.version }} --mode pull-request --log-level debug
35+
else
36+
fern generate --group ruby-sdk --version ${{ inputs.version }} --log-level debug
37+
fi

.github/workflows/release-ts-sdk.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release TypeScript SDK
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version of the TypeScript SDK that you would like to release"
8+
required: true
9+
type: string
10+
makePR:
11+
description: Make Pull Request
12+
required: true
13+
default: false
14+
type: boolean
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v3
22+
23+
- name: Setup node
24+
uses: actions/setup-node@v3
25+
26+
- name: Download Fern
27+
run: npm install -g fern-api
28+
29+
- name: Release TypeScript SDK
30+
env:
31+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
32+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
run: |
34+
if ${{ github.event.inputs.makePR }}; then
35+
fern generate --group ts-sdk --version ${{ inputs.version }} --mode pull-request --log-level debug
36+
else
37+
fern generate --group ts-sdk --version ${{ inputs.version }} --log-level debug
38+
fi

README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,46 @@
1-
# vapi-fern-config
2-
The Fern Configuration for generating Vapi's SDKs
1+
# VAPI Fern Configuration
2+
3+
This repository contains our Fern Configuration:
4+
5+
- [OpenAPI spec](./openapi.json)
6+
- [OpenAPI Overrides](./openapi-overrides.yml)
7+
- [SDK generator config](./fern/generators.yml)
8+
9+
## Setup
10+
11+
```sh
12+
npm install -g fern-api
13+
```
14+
15+
## Validating your OpenAPI Specs
16+
17+
To validate your API, run:
18+
19+
```sh
20+
fern check
21+
```
22+
23+
## Managing SDKs
24+
25+
### Deploying your SDKs
26+
27+
To deploy your SDKs, simply run the `Release Python SDK` GitHub Action with the
28+
desired version for the release. Under the hood, this leverages the Fern CLI:
29+
30+
```sh
31+
fern generate --group python-sdk
32+
```
33+
34+
### Developing SDKs
35+
36+
You can also regenerate the SDKs locally by running:
37+
38+
```sh
39+
fern generate --group python-sdk --preview --log-level debug
40+
```
41+
42+
This will generate the SDK and download it to a local folder that can be pip installed.
43+
44+
```sh
45+
pip install -e /fern/.preview/fern-python-sdk
46+
```

fern/fern.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"organization": "vapi",
3-
"version": "0.42.14"
3+
"version": "0.43.8"
44
}

0 commit comments

Comments
 (0)