Forum Discussion
Techtez
3 months agoOccasional Contributor
Hi all,
we have fixed this issue by restricting the package scan for a specific packages using following code.
try {
OpenAPI oas = new OpenAPI();
SwaggerConfiguration oasConfig = new SwaggerConfiguration()
.openAPI(oas)
.prettyPrint(true)
// Replace with your actual package(s)
.resourcePackages(Set.of("com.exampl.your.package"));
new JaxrsOpenApiContextBuilder()
.application(this)
.openApiConfiguration(oasConfig)
.buildContext(true);
} catch (OpenApiConfigurationException e) {
throw new RuntimeException(e.getMessage(), e);
}
Thanks