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: docs/sdks/guides/publish-specs-to-api-registry.mdx
+107Lines changed: 107 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,3 +89,110 @@ The API Registry can be used to:
89
89
- Track changes to specs, view detailed change reports, and download past versions of the spec.
90
90
- Create a stable public URL for sharing a particular revision of the spec.
91
91
- Use the registry URI as a source for generating SDKs, for example: `registry.speakeasy.com/your-company/your-company/my-api`.
92
+
93
+
## Triggering downstream SDK generation
94
+
95
+
For teams that manage SDKs in separate repositories, the spec repo can trigger SDK generation in downstream repos when changes are made. This pattern is useful when:
96
+
97
+
- A central team manages the API specification
98
+
- Multiple SDK repositories need to be generated from the same spec
99
+
- SDK generation should be triggered automatically when the spec changes
100
+
- SDK PRs should be created in downstream repos for review before merging
Each downstream SDK repository needs a workflow that accepts `workflow_dispatch` inputs. After running `speakeasy configure github`, modify the generated workflow to accept these inputs:
| `SPEAKEASY_API_KEY` | Authenticates the Speakeasy CLI. Obtain from the [Speakeasy Platform](https://app.speakeasy.com) API Keys page. |
180
+
| `DOWNSTREAM_SDK_TOKEN` | A fine-grained GitHub PAT with `actions: write`, `contents: write`, and `pull-requests: write` permissions on all downstream SDK repos. |
181
+
182
+
On each downstream SDK repository:
183
+
184
+
| Secret | Description |
185
+
|--------|-------------|
186
+
| `SPEAKEASY_API_KEY` | Authenticates the Speakeasy CLI. Can be the same key as the spec repo or a separate key. |
187
+
188
+
### Example implementation
189
+
190
+
A complete working example is available in the [examples-downstream-spec-repo](https://github.com/speakeasy-api/examples-downstream-spec-repo) repository, which triggers SDK generation in:
0 commit comments