ServerSelector

Domain

Dropdown for selecting the active API server, with environment badges (production, staging, development, sandbox).

Multi-environment servers

Preview
Code
<ServerSelector servers={[
  { serverId: 'srv1', url: 'https://api.example.com/v1', environment: 'production' },
  { serverId: 'srv2', url: 'https://staging-api.example.com/v1', environment: 'staging' },
  { serverId: 'srv3', url: 'http://localhost:3000/v1', environment: 'development' },
]} />

Single server

Preview
Code
<ServerSelector servers={[
  { serverId: 'srv1', url: 'https://api.example.com/v1', environment: 'production' },
]} />
Sourcemodules/domains/api-doc/ServerSelector.tsx