ITADN

[Feature request]: Built-in environment-based visual indicator (Dev/Test/Staging/Prod) for Swagger UI

#3923Openmtivlishvili 创建于 2026-04-24
feature suggestion
M
mtivlishvilicommented
### Is your feature request related to a specific problem? Or an existing feature? Yes. When working with multiple environments (Development, Staging, Production), Swagger UI looks identical across all of them. This creates a risk of accidentally executing requests against the wrong environment, especially Production. While this can currently be addressed using InjectStylesheet or custom JavaScript, it requires manual setup in every project and leads to duplicated configuration across codebases. ### Describe the solution you'd like I would like an optional, built-in way to indicate the current environment in Swagger UI. For example: - Display a small label or banner showing the environment (e.g. "Development", "Staging", "Production") - Optionally allow setting a color (e.g. green, orange, red) - Configure this via SwaggerUIOptions without requiring custom CSS or JavaScript This feature would be opt-in and would not affect existing users unless explicitly enabled. ### Additional context _No response_
3 条评论