Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show only specific tags in Swagger UI? #10143

Open
chirag1807 opened this issue Sep 22, 2024 · 1 comment
Open

How to show only specific tags in Swagger UI? #10143

chirag1807 opened this issue Sep 22, 2024 · 1 comment

Comments

@chirag1807
Copy link

chirag1807 commented Sep 22, 2024

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

@heldersepu
Copy link
Contributor

this should not be the job of the UI... I imagine that you can create a plugin that does that, but...
whatever generates that specification should do that filtering/removal job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants