-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
Q&A (please complete the following information)
- OS: Windows 10
- Browser: Firefox mozilla
- Version: 82.0.3
- Method of installation: npm swagger-ui-dist
- Swagger-UI version: 3.36.2
- Swagger/OpenAPI version: Swagger 2.9.2
Content & configuration
Using SwaggerUIBundle with filter, which is using tags. I've noticed if I have a tag that the value contains in other tags (case-sensitive), e.g. tag "street" and tag "streetNumber", when I use filter: "street"
, it will display all operations for "street" tag as well as "streetNumber" tag. I want to only display operations for "street" tag.
Currently my workaround is adding an extra space: "street " tag, but this is not ideal because that means everytime we update or add new tags, we need to check all other tags to make sure no tag value contains other tag value.
To reproduce...
Steps to reproduce the behavior:
- Go to Rest Controller, create 2 methods, and add below
@ApiOperation
withtags
on method1 and method2:
for method1: @ApiOperation(value = "Display street", tags = "street")
for method2: @ApiOperation(value = "Display street number", tags = "streetNumber")
- Get swagger-ui-dist and add SwaggerUIBundle with
filter: "street"
to a html page - Scroll down to where you add to display the operations
- You will see both method1 ("street" tag) and method2 ("streetNumber") tag are displayed
Expected behavior
My expectation is only operations for that exact tag value will be displayed, e.g. using the above example, only method1 should be displayed, not both method1 and method2.