-
Notifications
You must be signed in to change notification settings - Fork 3
docs: add documentation for x-fern-sdk-variables extension #1748
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
tjb9dc
merged 7 commits into
main
from
devin/1762263551-document-sdk-variables-extension
Nov 5, 2025
Merged
docs: add documentation for x-fern-sdk-variables extension #1748
tjb9dc
merged 7 commits into
main
from
devin/1762263551-document-sdk-variables-extension
Nov 5, 2025
+81
−0
Conversation
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
Co-Authored-By: thomas@buildwithfern.com <tjb9dcshop@gmail.com>
🤖 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:
|
Co-Authored-By: thomas@buildwithfern.com <tjb9dcshop@gmail.com>
…gestion Co-Authored-By: thomas@buildwithfern.com <tjb9dcshop@gmail.com>
Co-Authored-By: thomas@buildwithfern.com <tjb9dcshop@gmail.com>
Co-Authored-By: thomas@buildwithfern.com <tjb9dcshop@gmail.com>
tjb9dc
approved these changes
Nov 4, 2025
devalog
approved these changes
Nov 5, 2025
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.
Document x-fern-sdk-variables OpenAPI extension
Summary
This PR adds comprehensive documentation for the
x-fern-sdk-variablesOpenAPI extension, which allows defining common path parameters at the document level. These variables (like tenant IDs or environment identifiers) are set once during SDK client initialization rather than passed to each method call.Changes:
/openapi/extensions/sdk-variableswith configuration examples and SDK usage patterns for TypeScript, Python, and Javaapi-def.ymlfor sidebar visibilityx-fern-sdk-variablesandx-fern-sdk-variableextensionsReview & Testing Checklist for Human
Verify minimum version numbers - The versions (TypeScript 2.6.3, Python 4.24.0, Java 3.6.3) were determined through git history research. Python 4.24.0 has an explicit changelog entry, but TypeScript/Java versions were inferred from bug fix commits. Consider testing with earlier versions to confirm they lack support, or check release notes/changelogs to confirm these are the first versions with the feature.
Test the string-only limitation - The documentation states SDK variables only support string types based on code in
getVariableDefinitions.tsthat checksschema.type === "string". Verify this by attempting to define variables with other types (integer, boolean, object) and confirming they're rejected with the documented error message.Test navigation and links after deployment - Verify the sidebar link works correctly and the link from
/learn/api-definitions/openapi/extensions/overviewnavigates to the new SDK variables page at the correct URL.Recommended test plan
Create a minimal OpenAPI spec to validate the documented behavior:
Generate SDKs for all three languages and verify the behavior matches the documentation examples.
Notes
packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/, IR definitions, and TypeScript/Python/Java generator code)TypeReferencebut the OpenAPI parser currently only accepts string types