From 2ff98874f939daa679a215820d346248da2a92f5 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 17:08:03 +0000 Subject: [PATCH] docs: document preserve-one-of-in-all-of OpenAPI setting Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- fern/snippets/openapi-specs.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fern/snippets/openapi-specs.mdx b/fern/snippets/openapi-specs.mdx index ac63bedc4..bd590341a 100644 --- a/fern/snippets/openapi-specs.mdx +++ b/fern/snippets/openapi-specs.mdx @@ -149,6 +149,12 @@ api: If true, preserve oneOf structures with a single schema. If false, unwrap them. + + Whether to keep a `oneOf` or `anyOf` that appears as a member of an `allOf` as a union. When `false`, every variant's properties are merged into a single object and marked optional, which makes invalid property combinations representable. When `true`, the `allOf` is distributed over the union: `allOf: [oneOf: [A, B, C], S]` becomes `oneOf: [A & S, B & S, C & S]`, an undiscriminated union in which each variant keeps its own required properties alongside the shared ones. + + Enabling this setting changes the generated request and response shapes for affected schemas in every SDK, and the API Reference renders a variant selector for them. Union members that declare a `discriminator` are left intact. + + Filter to apply to the OpenAPI specification. Use this to limit which endpoints are included in the generated SDK or API Reference docs [based on their paths](/learn/api-definitions/openapi/extensions/audiences#path-based-filtering).