{ return GroupedOpenApi.builder() .group("public-api") .packagesToScan(new String[]{"com.example.publiccontrollers"}) .build(); } @Bean public GroupedOpenApi adminApi() { return GroupedOpenApi.builder() .group("admin-api") .packagesToScan(new String[]{"com.example.admincontrollers"}) ....
I am not sure, you can achieve the filtering based on the GroupedOpenApi Bean, as it filters only the application code (not the external definitions). With your use case, it makes sense to allow (pathsToMatch and packagesToScan) to be absent, if openApiCustomisers is present. If you have...