I have swagger generated by plugin from yaml definition
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.3.1</version>
<configuration>
<logToStderr>false</logToStderr>
<generatorName>spring</generatorName>
<generateSupportingFiles>true</generateSupportingFiles>
<supportingFilesToGenerate>ApiUtil.java</supportingFilesToGenerate>
<ignoreFileOverride>${project.basedir}/src/main/resources/.openapi-generator-ignore
</ignoreFileOverride>
<configOptions>
<dateLibrary>java8-localdatetime</dateLibrary>
<serializableModel>true</serializableModel>
<delegatePattern>true</delegatePattern>
<useBeanValidation>true</useBeanValidation>
<performBeanValidation>true</performBeanValidation>
...
This generate swagger documentation with empty controller groups
I want to remove them
I tried to modify
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
//.ignoredParameterTypes(DokumentApiController.class)
.select()
//.apis(RequestHandlerSelectors.basePackage("....dokument.api"))//.apis(GroupNameFilter()) //
//.apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.any()) //.paths(restApiPaths()) //.paths(PathSelectors.any())
.build()
.apiInfo(apiInfo());
You can see what I tried in commented code. The result is allways the same. I either have the empty groups there or I do not have anything on the documentation page http://127.0.0.1:8080/.../swagger-ui.html#/
How can I remove those empty "-controller" groups?
P.S.: I seen How to remove controller list from Swagger UI I tried to use it in class which implements Delegate but a lot of classes in my solution are generated by plugin and I can't change them directly.