metadata fills the info block of the generated document. It is the only required plugin option.
payload.config.ts
The base URL is not metadata
metadata carries the API’s title, version, and description only — never its URL. Keeping the base URL out of the config is what lets the same document work behind any host, proxy, or environment.
- Over HTTP, the spec’s
serversfield is filled in per request from the incomingHostheader. There is nothing to configure. - Writing to a file, there is no request to read a host from, so you set it yourself with the CLI’s
--serverflag (see Generate) or an explicitserversarray when building the document in your own code (see Programmatic use).