Skip to navigation

Base path

View as Markdown

Use the x-fern-base-path extension to configure the base path prepended to every endpoint.

The example below configures the /v1 base path so the full endpoint path is https://api.example.com/v1/users.

Set the base path in openapi.yml
x-fern-base-path: /v1
servers:
- url: https://api.example.com
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 to give each spec its own base path.