Skip to content

Document namespaced-errors OpenAPI setting - #6870

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1788714403-namespaced-errors-setting
Open

Document namespaced-errors OpenAPI setting#6870
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1788714403-namespaced-errors-setting

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

settings.namespaced-errors is a new opt-in, per-spec OpenAPI setting in generators.yml (Fern CLI 5.114.0/5.114.1). By default Fern compares shared error responses across the whole API by status code, so when two specs return different bodies for the same status (e.g. two different 429 bodies) the shared error's body collapses to unknown/any in generated SDKs. With the setting enabled, a response object in components.responses tagged x-fern-sdk-namespace: <name> is declared in that namespace and conflict-checked only within it, so customers get typed per-namespace error classes (e.g. plants.TooManyRequestsError) while keeping the spec's endpoints and other types at the root. Only the response-object extension is honored, and the setting applies only to the spec that sets it.

Implements docs for: feat(openapi): add namespaced-errors setting to scope errors by response/body-schema namespace (fern-api/fern#17650) — fern-api/fern#17650 and fix(openapi): scope namespaced-errors to its spec and only honor response-object namespace (fern-api/fern#17655) — fern-api/fern#17655

Pages changed:

  • fern/snippets/openapi-specs.mdx — new settings.namespaced-errors ParamField with a generators.yml + components.responses example (rendered on both the SDKs generators.yml reference and the API definitions generators.yml reference).
  • fern/products/api-def/openapi/extensions/overview.mdx-fern-sdk-namespace row in the extensions table linking to the new setting.
  • fern/products/api-def/pages/project-structure.mdx — one-sentence pointer from the "Add namespaces" step.

No global api.settings entry was added: that section only documents auto-generate-idempotency-key and defers per-type settings to the spec-type snippets. pre-commit (Vale) and fern check --warnings pass.

Link to Devin session: https://app.devin.ai/sessions/912e45182fd54b008b9590a79ac6ce3b
Open in Devin Desktop: https://app.devin.ai/desktop/session/912e45182fd54b008b9590a79ac6ce3b?variant=devin

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

Copy link
Copy Markdown
Contributor Author

🤖 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, CI, and merge conflict monitoring

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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.

0 participants