swagger-api / swagger-api/swagger-ui
How to show only specific tags in Swagger UI?
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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