How to use OpenAPI Overrides
Use overrides to customize user-facing documentation fields, examples, and naming.
When you generate your OpenAPI from server code, you may want to further customize portions of your OpenAPI spec. You can do this with OpenAPI Overrides. When you run fern generate
, Fern will automatically apply these overrides on top of your OpenAPI spec.
How to use OpenAPI Overrides
To use OpenAPI Overrides, create a file named openapi-overrides.yml
. You can put the file anywhere in your project. This file contains the overrides you want to apply to your OpenAPI spec. For more on the extensions available, visit our page on OpenAPI Extensions.
Example
Here’s an example of an openapi-overrides.yml
file for the ElevenLabs API:
Specifying OpenAPI Overrides in generators.yml
You’ll need to specify the path to your openapi-overrides.yml
file in your generators.yml
file. Here’s an example: