Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions fern/snippets/openapi-specs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ api:
If true, preserve oneOf structures with a single schema. If false, unwrap them.
</ParamField>

<ParamField path="settings.preserve-one-of-in-all-of" type="boolean" default="false" toc={true}>
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.
</ParamField>

<ParamField path="settings.filter" type="object" toc={true}>
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).

Expand Down
Loading