You can use the @Hidden annotation from swagger-annotations, on the top of the controller you want to hide.
Or you can use properties to filter the endpoints to show, filtering by path or package:
# Packages to include
springdoc.packagesToScan=com.package1, com.package2
or
# Paths to include
springdoc.pathsToMatch=/v1, /api/balance/**
You can remove @EnableSwagger2 from your swagger config file or openapi config file then these openapi-resource controller will authomatically be removed.