-
Notifications
You must be signed in to change notification settings - Fork 3
(sdks) Add new How it works page #1031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| title: How SDKs work | ||
| description: Learn how Fern generates SDKs using cloud infrastructure | ||
| --- | ||
|
|
||
| Fern combines your API specifications with generator configurations and custom code to produce SDKs in multiple languages. By default, SDK generation runs on Fern's managed cloud infrastructure. | ||
|
|
||
| <Info> | ||
| Alternatively, [you can run SDK generation on your own infrastructure](/sdks/deep-dives/self-hosted) to meet specific security or compliance requirements. | ||
| </Info> | ||
|
|
||
| ## Generation workflow | ||
|
|
||
| Before generating SDKs, you'll configure your `fern/` folder with SDK generators specified in `generators.yml` and connect your API specification. You can also add custom code, tests, and other configuration as needed. | ||
|
|
||
| Running `fern generate` kicks off the cloud generation process and involves a few key steps: | ||
|
|
||
| <Steps> | ||
| <Step title="Cloud execution"> | ||
| Fern allocates compute resources with Fiddle and pulls the appropriate Docker image for your specified generator version. | ||
| </Step> | ||
| <Step title="Generate core SDK"> | ||
| The Docker container executes the generation logic and produces your SDK's core files (models, client code, API methods). | ||
| </Step> | ||
| <Step title="Verify organization"> | ||
| Fern verifies your organization registration to ensure the complete SDK can be generated. Without organization verification, only partial SDK files (core code without package metadata) are produced. | ||
| </Step> | ||
| <Step title="Add package metadata"> | ||
| Fern completes the SDK by adding package distribution files such as `pyproject.toml`, `package.json`, README, and any dependencies. | ||
| </Step> | ||
| <Step title="Output to destination"> | ||
| Fern publishes or saves the complete SDK to your configured location (local filesystem, GitHub repository, package registry). After publication, developers can use your SDKs to integrate with your APIs. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| <Accordion title="Architecture diagram" toc={true}> | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| autonumber | ||
| participant Dev as Developer | ||
| participant Fern as Fern | ||
| participant Docker as Docker Container | ||
| participant Dest as Output Destination | ||
|
|
||
| Dev->>Fern: fern generate | ||
| Fern->>Fern: Allocate cloud compute | ||
| Fern->>Docker: Pull & run generator image | ||
| Docker->>Docker: Generate core SDK files | ||
| Docker->>Fern: Return partial SDK | ||
| Fern->>Fern: Verify organization | ||
| Fern->>Fern: Add package metadata | ||
| Fern->>Dest: Output complete SDK | ||
| ``` | ||
| </Accordion> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.