You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/sdks/github-setup.mdx
+43-15Lines changed: 43 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,19 @@ title: Set up your GitHub Structure
3
3
description: Set up GitHub repositories for your SDKs
4
4
---
5
5
6
-
Before generating SDKs with Fern, you'll need to set up the proper GitHub repository structure to house your API definitions and SDK code.
6
+
Before generating SDKs with Fern, you'll need to set up the proper GitHub
7
+
repository structure to house your API definitions and SDK code so it's
8
+
intuitive for you and your users to access, maintain, and update code.
7
9
8
-
## Create or identify your GitHub repositories
10
+
<Steps>
11
+
## Structuring your top-level repository
9
12
10
-
1. Identify or create a top-level GitHub repository where you want all of your SDK and API code to live.
11
-
1. Create a new GitHub repository called `company-<language>` (or something similar) for each of your SDKs, if you haven't done so already.
12
-
1. Install the [Fern GitHub App](https://github.com/apps/fern-api) on the top-level repository and all SDK repositories. Select **Configure**, then scroll down to **Repository Access**. Select **Only select repositories** and in the dropdown select the repository for your SDK. Click **Save**.
13
-
14
-
## Overall GitHub structure
15
-
16
-
Structure the top-level GitHub repository containing all of your SDKs and APIs
17
-
so it's intuitive for you and your users to access, maintain, and update.
13
+
1. Identify or create a top-level GitHub repository where you want all of your
14
+
SDK and API code to live.
15
+
1. Install the [Fern GitHub App](https://github.com/apps/fern-api) on the
16
+
top-level repository and all SDK repositories. Select **Configure**, then
17
+
scroll down to **Repository Access**. Select **Only select repositories** and
18
+
in the dropdown select the repository for your SDK. Click **Save**.
18
19
19
20
For example, your basic GitHub file structure should look something like this:
20
21
@@ -25,7 +26,7 @@ For example, your basic GitHub file structure should look something like this:
25
26
├─ sdks/
26
27
└── generators.yml # Contains settings for all SDKs
27
28
```
28
-
your`generators.yml` file will contain a group for each of your SDKs. Each group points
29
+
Your`generators.yml` file will contain a group for each of your SDKs. Each group points
29
30
to the GitHub repository for the relevant SDK.
30
31
31
32
For example, the `group` for a TypeScript SDK might look like this:
To get started configuring your SDK, see the Quickstart
48
-
49
48
<Info>You can also additionally configure the `github` section to whether Fern
50
49
should commit and release, create a pull request, or push code to a branch when
51
50
you make changes to your SDK code. See [GitHub
52
51
Configuration](/sdks/reference/generators-yml#github-configuration) for more
53
52
details. </Info>
54
53
55
-
### Structure a repository for a specific SDK
54
+
## Structuring SDK-specific repositories
55
+
56
+
1. Create a new GitHub repository called `company-<language>` (or something
57
+
similar) for each of your SDKs, if you haven't done so already.
58
+
1. Install the [Fern GitHub App](https://github.com/apps/fern-api) on the
59
+
top-level repository and all SDK repositories. Select **Configure**, then
60
+
scroll down to **Repository Access**. Select **Only select repositories** and
61
+
in the dropdown select the repository for your SDK. Click **Save**.
62
+
56
63
57
64
The repository structure for a specific SDK should look similar to this:
58
65
@@ -77,5 +84,26 @@ Fern generates most of the SDK files listed in this example repository (`scripts
77
84
78
85
For additional examples, see Cohere's [Python SDK repository](https://github.com/cohere-ai/cohere-python) and [Vapi's TypeScript SDK repository](https://github.com/VapiAI/server-sdk-typescript).
79
86
80
-
87
+
## Generate an SDK in your desired language
88
+
89
+
Once you've set up your GitHub repository structure, you can proceed with generating SDKs in your desired languages.
0 commit comments