docs: add server URL templating documentation to SDK design section#3672
Open
iamnamananand996 wants to merge 3 commits intomainfrom
Open
docs: add server URL templating documentation to SDK design section#3672iamnamananand996 wants to merge 3 commits intomainfrom
iamnamananand996 wants to merge 3 commits intomainfrom
Conversation
Co-Authored-By: naman.anand@buildwithfern.com <iamnamananand996@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
||
| Server URL templating lets you define base URLs with variable placeholders (e.g., `{region}`, `{environment}`) that SDK users can customize at runtime. This is useful for APIs deployed across multiple regions, environments, or custom domains. | ||
|
|
||
| Fern reads the standard OpenAPI `servers` block and generates SDK clients that accept these variables, falling back to sensible defaults when they are not provided. |
Contributor
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'they're' instead of 'they are'.
Contributor
|
🌿 Preview your docs: https://fern-preview-8881a5fe-e1e0-4f8a-811a-32fc933f762a.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
Co-Authored-By: naman.anand@buildwithfern.com <iamnamananand996@gmail.com>
Co-Authored-By: naman.anand@buildwithfern.com <iamnamananand996@gmail.com>
|
|
||
| ## Language support | ||
|
|
||
| Server URL templating is currently supported in the following generators: |
Contributor
There was a problem hiding this comment.
[FernStyles.Current] Avoid time-relative terms like 'currently' that become outdated
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
docs: add server URL templating page to SDK design section
Summary
Adds a new documentation page explaining the server URL templating feature under the "SDK design" section of the SDKs product docs. The page covers:
serversblock withvariables,x-fern-default-url,x-server-name)serverswithx-fern-server-name)api.ymlwithurl-templates,default-urls,variables)Content was derived from reading the
fern-api/fernrepo: the OpenAPI test fixture attest-definitions/fern/apis/server-url-templating/openapi.yml, the IR schema types (ServerVariableSchema,SingleBaseUrlEnvironmentSchema,MultipleBaseUrlsEnvironmentSchema), seed-generated SDK outputs (seed/ts-sdk/server-url-templating/), and the v63-to-v62 IR migration.Updates since last revision
fern docs dev(tabs, tables, code highlighting,<Icon>components all display as expected).View original video (rec-4b70dc4e1858470bbf0f8f96382f415e-edited.mp4)
Review & Testing Checklist for Human
api.ymlexample withurl-templates,default-urls, andvariableswas derived from internal schema types (MultipleBaseUrlsEnvironmentSchema). Confirm this is a valid user-facing config format and not just an internal representation populated during OpenAPI import.x-server-namevsx-fern-server-name: The source OpenAPI fixture usesx-server-nameat the top level andx-fern-server-nameat the endpoint level. Verify the docs correctly explain when to use each.seed/python-sdk/server-url-templating/andseed/java-sdk/server-url-templating/.Notes