Class decorator: serve the API contract, declaratively.
@OpenApi() is the whole setup. Two routes appear, /openapi.json and its explorer at /docs,
and the document is assembled per request so the server URL it advertises is the host that
answered: the same artefact documents itself correctly behind a local port, a load balancer or an
API Gateway stage. Set docsPath: false to serve the machine-readable contract alone.
Class decorator: serve the API contract, declaratively.
@OpenApi()is the whole setup. Two routes appear,/openapi.jsonand its explorer at/docs, and the document is assembled per request so the server URL it advertises is the host that answered: the same artefact documents itself correctly behind a local port, a load balancer or an API Gateway stage. SetdocsPath: falseto serve the machine-readable contract alone.