Skip to content

Fix SDK config docs: correct field names, defaults, and add missing flags#5208

Merged
fern-support merged 2 commits intomainfrom
devin/1777399715-fix-sdk-config-docs
Apr 28, 2026
Merged

Fix SDK config docs: correct field names, defaults, and add missing flags#5208
fern-support merged 2 commits intomainfrom
devin/1777399715-fix-sdk-config-docs

Conversation

@Swimburger
Copy link
Copy Markdown
Member

@Swimburger Swimburger commented Apr 28, 2026

Summary

Audit of all 9 SDK generator configuration pages against the source-of-truth config schemas in fern-api/fern. Fixes incorrect field names, wrong defaults, wrong types, and adds three previously undocumented cross-generator flags.

Bug fixes

  • Python: lazy_importlazy_imports (wrong field name — would cause Pydantic validation error)
  • Python: pyproject_python_version default ^3.8^3.10 (wrong default)
  • Ruby: modulemoduleName (wrong field name for Ruby v2)
  • Go: enableWireTests type stringboolean (wrong type)
  • TypeScript: generateSubpackageExports default falsetrue (wrong default)
  • Go: Added missing defaults for alwaysSendRequiredProperties (true), inlinePathParameters (true), inlineFileProperties (true), useReaderForBytesRequest (true), union ("v1")
  • Go: Removed packageLayout (Go v1-only option, does not exist in v2)

New documentation

  • maxRetries — added to all 9 languages (TS, Python, Java, Go, C#, PHP, Ruby, Rust, Swift)
  • offsetSemantics — added to Python, Java, Go, C#, PHP, Ruby (TS already had it)
  • omitFernHeaders — added to Python, Java, Go, C#, PHP, Ruby (TS already had it)

Review & Testing Checklist for Human

  • Verify Python lazy_imports (plural) matches the actual Pydantic field name in generators/python/src/fern_python/generators/sdk/custom_config.py
  • Verify Python pyproject_python_version default is indeed ^3.10 in latest generator
  • Verify Ruby moduleName is the correct config key for Ruby v2 (BaseRubyCustomConfigSchema.ts)
  • Spot-check that maxRetries, offsetSemantics, and omitFernHeaders use the correct casing per language (camelCase for Go/Ruby/PHP/TS, kebab-case for Java/C#, snake_case for Python)
  • Preview the config pages to confirm ParamFields render correctly

Notes

  • Rust and Swift do not have offsetSemantics or omitFernHeaders in their schemas, so those flags were intentionally not added to those languages.
  • For Rust, maxRetries defaults to 3 when unset (hardcoded in ClientConfigGenerator.ts); this is noted in the docs.
  • Python uses default_max_retries (snake_case) as the config key, with maxRetries accepted as an alias via parse_obj.

Link to Devin session: https://app.devin.ai/sessions/e2be987659314cca813d1c2488e156b1
Requested by: @Swimburger


Open in Devin Review

…es, offsetSemantics, omitFernHeaders

- Fix Python: lazy_import -> lazy_imports (wrong field name)
- Fix Python: pyproject_python_version default ^3.8 -> ^3.10
- Fix Ruby: module -> moduleName (wrong field name)
- Fix Go: enableWireTests type string -> boolean
- Fix TS: generateSubpackageExports default false -> true
- Add Go defaults: alwaysSendRequiredProperties, inlinePathParameters, inlineFileProperties, useReaderForBytesRequest (all true), union (v1)
- Remove Go packageLayout (v1-only, not in v2)
- Document maxRetries across all 9 language config pages
- Document offsetSemantics for TS, Python, Java, Go, C#, PHP, Ruby
- Document omitFernHeaders for TS, Python, Java, Go, C#, PHP, Ruby

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View 6 additional findings in Devin Review.

Open in Devin Review

Comment on lines +67 to +69
<ParamField path="maxRetries" type="number" required={false} toc={true}>
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
</ParamField>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 maxRetries uses camelCase in C# config where all other options use kebab-case

The C# configuration page uses kebab-case for every config key (base-api-exception-class-name, inline-path-parameters, offset-semantics, omit-fern-headers, etc. — 21 options total), but the newly added maxRetries on line 67 is the sole camelCase outlier. Notably, the other two options added in this same PR (offset-semantics at line 75 and omit-fern-headers at line 82) correctly use kebab-case, strongly suggesting maxRetries is a copy-paste error. If the generator expects max-retries, users following these docs will use the wrong key and the option will be silently ignored.

Suggested change
<ParamField path="maxRetries" type="number" required={false} toc={true}>
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
</ParamField>
<ParamField path="max-retries" type="number" required={false} toc={true}>
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
</ParamField>
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The casing is actually correct — the C# schema in CsharpConfigSchema.ts:119 defines the key as maxRetries (camelCase), not max-retries:

maxRetries: z.number().int().min(0).optional()

This is the one key in the C# config that breaks the kebab-case convention — it was added more recently than the other options. The docs match the source of truth.

Comment on lines +89 to +91
<ParamField path="maxRetries" type="number" required={false} toc={true}>
The default number of retries for failed requests. When not set, the generated SDK uses its own built-in default. SDK users can still override this per-request via request options.
</ParamField>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 maxRetries uses camelCase instead of kebab-case in Java config, inconsistent with all other options

The Java generator configuration uses kebab-case for every other multi-word config option (e.g., base-api-exception-class-name, client-class-name, inline-path-parameters, enable-wire-tests, offset-semantics, omit-fern-headers, etc. — 27 options total at fern/products/sdks/generators/java/configuration.mdx). The newly added maxRetries is the sole camelCase option. The other two options added in this same PR (offset-semantics at line 97 and omit-fern-headers at line 104) correctly use kebab-case. If the documented key doesn't match what the generator actually expects, users will set a config value that is silently ignored, causing unexpected retry behavior.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The casing is actually correct — the Java schema in BaseJavaCustomConfigSchema.ts:44 defines the key as maxRetries (camelCase):

maxRetries: z.number().int().min(0).optional()

This key was added more recently and doesn't follow the kebab-case convention of the other Java config keys, but the docs need to match the actual schema.

Good catch on the alphabetical ordering though — fixed in dfce849.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@fern-support fern-support merged commit 0c4d7e6 into main Apr 28, 2026
3 checks passed
@fern-support fern-support deleted the devin/1777399715-fix-sdk-config-docs branch April 28, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants