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
| Source | When | Example |
|---|---|---|
GET /api-json | Default: matches what SwaggerModule.setup() from @nestjs/swagger exposes alongside Swagger UI | https://api.example.com/docs → fetches https://api.example.com/api-json |
?spec=<url> | Query param: takes precedence over the default when present | https://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.