Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.2.4
-
None
-
None
-
Unknown
Description
In CXF 3.2.4 (and also in master), the class org.apache.cxf.jaxrs.swagger.SwaggerUiService has a single public constructor,
public SwaggerUiService(SwaggerUiResourceLocator locator, Map<String, String> mediaTypes)
However, the first argument SwaggerUiResourceLocator is a package-private class.
So, effectively no one outside the package can use that constructor.
This doesn't make any logical sense. Either the constructor should be package-private, or the SwaggerUiResourceLocator class should be public.
In CXF 3.1.11, I subclass Swagger2Feature.SwaggerUIService to modify its behaviour.
I am trying to upgrade from CXF 3.1.11 to CXF 3.2.4.
In CXF 3.2.4, Swagger2Feature.SwaggerUIService has been replaced by SwaggerUiService class.
But I cannot subclass it because SwaggerUiResourceLocator is package-private.
I think the simplest solution would be to make SwaggerUiResourceLocator a public class.