A static API documentation interface is a pre-generated, browser-accessible client that presents API documentation without directly exposing the Swagger definition file or SwaggerUI. It supports a production deployment decision: keep interactive Swagger middleware limited to development while publishing a separate documentation experience. section 12.1.4
A practical deployment arrangement separates development tooling from published documentation:
- Enable Swagger and SwaggerUI when app.Environment.IsDevelopment() is true. section 12.1.4
- Generate static documentation with Swagger Editor and Swagger Codegen rather than exposing the definition and UI directly. section 12.1.4
Environment-gated Swagger
Use the development environment to expose Swagger middleware during implementation, then rely on the generated static interface for the production-facing documentation experience. section 12.1.4
