Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions fern/products/api-def/openapi/extensions/base-path.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ servers:
paths:
/users: ...
```

A plain base path applies to the whole API, so in a project with multiple OpenAPI specs only one document's value survives the merge. Enable [`respect-per-spec-base-path`](/learn/api-definitions/openapi/generators-yml-reference#settingsrespect-per-spec-base-path) to give each spec its own base path.
9 changes: 9 additions & 0 deletions fern/snippets/openapi-specs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ api:
- OrganizationId
```
</ParamField>

<ParamField path="settings.respect-per-spec-base-path" type="boolean" default="false" toc={true}>
When merging multiple OpenAPI specs, applies each document's [`x-fern-base-path`](/learn/api-definitions/openapi/extensions/base-path) to its own endpoints only. When `false`, one document's base path is prepended to every endpoint across all specs. Parameterized base paths such as `/{tenant}/v1` stay at the API root, and differing parameterized base paths across documents raise a conflict.

<Warning>
If you worked around the dropped prefix by adding it to your [server URL](/learn/api-definitions/openapi/extensions/server-names) (for example, `https://api.example.com/api/v3`), remove it when enabling this setting. Otherwise the prefix is applied twice.
</Warning>
</ParamField>

<ParamField path="settings.group-environments-by-host" type="boolean" default="false" toc={true}>
When enabled, groups servers by host into unified environments, enabling APIs with multiple protocols (REST, WebSocket, etc.) to share environment configuration. Environment URL IDs use the server name, with path or protocol suffixes added only when needed to resolve collisions.

Expand Down
Loading