Configuration

The UI has no build-time configuration: it resolves the spec to render entirely at runtime, via one rule with one override.

One rule, one override

SourceWhenExample
GET /api-jsonDefault: matches what SwaggerModule.setup() from @nestjs/swagger exposes alongside Swagger UIhttps://api.example.com/docs → fetches https://api.example.com/api-json
?spec=<url>Query param: takes precedence over the default when presenthttps://docs.example.com/?spec=https://api.example.com/api-json

CORS across different origins

If the UI is served on a different origin from the API, use the ?spec= override and make sure the API's CORS configuration allows that origin to GET the JSON document.