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

Swagger2Feature does not render resources from swagger-ui

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Do
    • Major
    • Future
    • jboss-fuse-6.3
    • CXF, Hawtio
    • None
    • % %

    Description

      • 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...

      Attachments

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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: