Skip to content

Commit 62bf922

Browse files
committed
add info about origin field
1 parent d448bf6 commit 62bf922

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# sync-openapi
22

3-
A GitHub Action to sync OpenAPI specifications with your Fern setup. Choose your scenario:
3+
A GitHub Action to [sync OpenAPI specifications with your Fern setup](/learn/api-definitions/openapi/sync-your-open-api-specification). Choose your scenario:
44

5-
- **Case 1: Sync from public URL (most common).** Your OpenAPI spec is hosted at a publicly available URL and you want to pull it into your fern folder
6-
- **Case 2: Sync between repositories**: Your OpenAPI spec lives in one repository and you want to sync it to another repository where your fern folder lives (like fern-config)
5+
- **Case 1: Sync from public URL (most common).** Your OpenAPI spec is hosted at a publicly available URL and you want to pull it into your fern folder. The GitHub Action uses `fern api update` to pull the latest version of your OpenAPI spec from the `origin` field in your `generators.yml` file.
6+
- **Case 2: Sync between repositories**: Your OpenAPI spec lives in one repository and you want to sync it to another repository where your fern folder lives (like fern-config). The GitHub Action uses explicit file mappings to pull the latest version of your OpenAPI spec.
77

88
## Usage
99

10-
### Case 1: Sync specs using `fern api update` (recommended)
10+
### Case 1: Sync specs from public URL (recommended)
1111

12-
1. In your your source repo, create a file named `sync-openapi.yml` in `.github/workflows/`.
12+
1. In your source repo, create a file named `sync-openapi.yml` in `.github/workflows/`.
1313
2. Include the following contents in `sync-openapi.yml`:
1414

1515
```yaml
@@ -42,7 +42,7 @@ jobs:
4242

4343
### Case 2: Sync files/folders between repositories
4444

45-
1. In your your source repo, create a file named `sync-openapi.yml` in `.github/workflows/`.
45+
1. In your source repo, create a file named `sync-openapi.yml` in `.github/workflows/`.
4646
2. Include the following contents in `sync-openapi.yml`:
4747

4848
```yaml
@@ -88,9 +88,9 @@ jobs:
8888
| `branch` | Branch to push to in the target repository | Yes | - | 1, 2 |
8989
| `auto_merge` | If `true`, pushes directly to the branch; if `false`, creates a PR from the branch onto `main` | No | `false` | 1, 2 |
9090
| `add_timestamp` | If `true`, appends a timestamp to the branch name | No | `true` | 1, 2 |
91-
| `sources` | Array of mappings with `from`, `to`, and optional `exclude` fields | Yes | - | 1 |
92-
| `repository` | Target repository in format `org/repo` | Yes | - | 1 |
93-
| `update_from_source`| If `true`, syncs from the source spec files rather than using existing intermediate formats | No | `false` | 2 |
91+
| `sources` | Array of mappings with `from`, `to`, and optional `exclude` fields | Yes | - | 2 |
92+
| `repository` | Target repository in format `org/repo` | Yes | - | 2 |
93+
| `update_from_source`| If `true`, syncs from the source spec files rather than using existing intermediate formats | No | `false` | 1 |
9494

9595

9696
**Note: you must set `auto_merge: true` when using `branch: main`**

0 commit comments

Comments
 (0)