Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7131

Swagger2Feature does not render resources from swagger-ui

XMLWordPrintable

    • Icon: Feature Feature
    • Resolution: Won't Do
    • Icon: Major Major
    • Future
    • jboss-fuse-6.3
    • CXF, Hawtio
    • 0
    • 0% 0%
    • Todo

      • Attached is a test case using Swagger2Feature, which is a simplified version of the same quiclstart/rest example.

      Modifying the example with the below configuration,

      <jaxrs:providers>
                  <!--<bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider"/>-->
                   <bean class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter"/> 
                   <bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider"/>
              </jaxrs:providers>
              <jaxrs:features>
                  <bean class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
                      <property name="title" value="Fabric8:CXF:Quickstarts - Customer Service"/>
                      <property name="description" value="Sample REST-based Customer Service"/>
                      <property name="version" value="${project.version}"/>
                  </bean>
              </jaxrs:features>
      

      If you then deploy the attachment and navigate to, http://localhost:8181/hawtio-swagger and then copy http://localhost:8181/cxf/crm/api-docs in textbox, we expect to see all the rest resources exposed.

      However, with using Swagger2Feature, we are getting,
      Can't read swagger JSON from http://localhost:8181/cxf/crm/api-docs

      Attached is a snapshot for the same...

        1. swagger-issue.png
          swagger-issue.png
          71 kB
        2. rest.zip
          91 kB

              johnpoth John Poth
              rhn-support-vgohel Viral Gohel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: