swagger-api / swagger-api/swagger-ui

How to show only specific tags in Swagger UI?

Open
#10,143 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

How can we help?

I have a Swagger UI setup with multiple tags in my OpenAPI specification, and I want to customize the UI to display only certain tags for each operation.

For example, in my spec file, I have the following path:

"paths": {
    "/v1/resource": {
      "post": {
        "description": "summary: Add Resource",
        "produces": [
          "application/json"
        ],
        "tags": [
          "v1",
          "resource"
        ],
        "operationId": "AddResource1"
      }
    }
  }

I want to display only the "resource" tag in the Swagger UI and hide the "v1" tag.

How can I achieve this? Is there a way to filter out tags programmatically in the Swagger UI configuration?
@char0n

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue mentions only a Swagger UI configuration and an OpenAPI path; no repository file, test, or entry point is identified. Start by locating the tag-rendering and configuration documentation, then determine whether selective tag display is supported and document the confirmed approach or its limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
documentation, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.