docs: document x-fern-global-parameters extension and CLI generator support#6076
Conversation
…upport Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.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:
|
| ### Fields | ||
|
|
||
| <ParamField path="name" type="string" required={true}> | ||
| The canonical identifier for the parameter. It is the base for the generated flag or constructor argument, and the key operations use to [opt in](#apply-to-specific-operations). |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'it's' instead of 'It is'.
| ### Fields | ||
|
|
||
| <ParamField path="name" type="string" required={true}> | ||
| The canonical identifier for the parameter. It is the base for the generated flag or constructor argument, and the key operations use to [opt in](#apply-to-specific-operations). |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Hyphens] 'in](#apply-to' doesn't need a hyphen.
| </ParamField> | ||
|
|
||
| <ParamField path="apply" type="string" default="explicit"> | ||
| How the parameter applies to operations. `explicit` applies only to operations that [opt in](#apply-to-specific-operations); `auto` applies to every operation whose request contains the target. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Hyphens] 'in](#apply-to' doesn't need a hyphen.
|
🌿 Preview your docs: https://fern-preview-devin-1783235236-document-global-parameters.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
| ### Fields | ||
|
|
||
| <ParamField path="name" type="string" required={true}> | ||
| The canonical identifier for the parameter. It's the base for the generated flag or constructor argument, and the key operations use to [opt in](#apply-to-specific-operations). |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Hyphens] 'in](#apply-to' doesn't need a hyphen.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Summary
Documents the
x-fern-global-parametersfeature on the public docs site, covering both shipped phases: the OpenAPI extension (parsing) and its consumption by the CLI generator.A global parameter is a value set once (at the client/CLI level) and injected into every relevant request instead of being passed per call — think a global
currencyset via flag, env var, or default. It generalizes global headers to any wire location (body/query/header/path).Changes
api-def/openapi/extensions/global-parameters.mdx— the full reference: thex-fern-global-parametersdeclaration and its fields (name,in,target,type,env,default,optional,apply,parameter-name), the per-operationx-fern-global-parameteropt-in, and the resolution order (per-call > flag/arg > env > default).x-fern-global-parametersrow.Cross-references follow the canonical-home pattern: the extension page owns the full explanation; the CLI page links to it.
Notes for reviewer
api-definitions, sectionextensions; CLI productcli-generator, sectionget-started), not disk paths.Link to Devin session: https://app.devin.ai/sessions/319fc43b72a241148ea408e965654d9f
Requested by: @Swimburger