Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7703

Public constructor of SwaggerUiService takes package-private argument of SwaggerUiResourceLocator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.4
    • 3.2.5
    • 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.

      Attachments

        Activity

          People

            coheigea Colm O hEigeartaigh
            skissane@medallia.com Simon Kissane
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: