Server names


title: Server names description: Name your servers using the x-fern-server-name extension

The x-fern-server-name extension is used to name your servers.

openapi.yml
1servers:
2 - url: https://api.example.com
3 x-fern-server-name: Production
4 - url: https://sandbox.example.com
5 x-fern-server-name: Sandbox

In a generated TypeScript SDK, you’d see:

environment.ts
1export const ExampleEnvironment = {
2 Production: "https://api.example.com"
3} as const;
4
5export type ExampleEnvironment = typeof ExampleEnvironment.Production;