Skip to content

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

@mtivlishvili

Description

@mtivlishvili

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions