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

Swagger UI 3.5.0 is not working with apaceh cxf 3.1.10

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • NeedMoreInfo
    • None
    • None
    • Moderate

    Description

      Hi,

       

      We are trying to create a swagger ui for apache cxf services and

      <host>:<port>/swagger.json gives me json response. But when I try http://localhost:<port>/api-docs/?url=/swagger.json I keep getting 404. 

       

      http://localhost:<port>/api-docs?url=swagger.json

      <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
      <version>3.1.11</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/org.webjars/swagger-ui -->
      <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>swagger-ui</artifactId>
      <version>3.5.0</version>
      </dependency>

       

      <bean id="swagger2Feature" class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
      <!-- customize some of the properties -->
      <bean id="jsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
      </bean>

      <jaxrs:server id="" address=">
      <jaxrs:serviceBeans>
      <ref bean="" />
      </jaxrs:serviceBeans>
      <jaxrs:providers>
      <ref bean="jsonProvider" />
      </jaxrs:providers>
      <jaxrs:features>
      <ref bean="swagger2Feature" />
      </jaxrs:features>
      </jaxrs:server>

      Attachments

        Activity

          People

            Unassigned Unassigned
            divya1990 div
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: