Skip to content

docs: document preserve-one-of-in-all-of OpenAPI setting - #6484

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785517663-preserve-one-of-in-all-of
Open

docs: document preserve-one-of-in-all-of OpenAPI setting#6484
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785517663-preserve-one-of-in-all-of

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

preserve-one-of-in-all-of is a new opt-in OpenAPI spec setting. Today, a oneOf (or anyOf) nested inside an allOf gets flattened: all variants' properties are merged into one object and marked optional, so the union disappears and invalid property combinations become representable. With the setting enabled, the importer keeps the union, so generated SDKs and the API Reference reflect the spec's real constraints (and the API Reference shows a variant selector).

Implements docs for: feat(cli): add preserve-one-of-in-all-of OpenAPI setting (fern-api/fern#17289)

Adds one <ParamField> to the shared OpenAPI spec settings snippet (fern/snippets/openapi-specs.mdx, rendered on the generators.yml references for SDKs and API definitions), placed next to the other oneOf/allOf settings:

  • default false
  • before/after shape: allOf: [oneOf: [A, B, C], S] becomes oneOf: [A & S, B & S, C & S], each variant keeping its own required properties plus the shared ones
  • caveat: enabling it changes generated request/response shapes in every SDK and renders a variant selector in the API Reference
  • union members that declare a discriminator are left intact

No new page and no changelog entry: the CLI changelog for 5.86.0 already covers the release (fern/products/cli-api-reference/cli-changelog/2026-07-30.mdx), and this is a CLI/SDK setting rather than a Docs product feature.

Link to Devin session: https://app.devin.ai/sessions/11132b3c32464381be946f33f0af06fd

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

@devin-ai-integration
devin-ai-integration Bot requested a review from devalog as a code owner July 31, 2026 17:08
@github-actions

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