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

Disable the camel-swagger feature

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • jboss-fuse-6.2
    • jboss-fuse-6.2
    • None
    • None
    • % %

    Description

      The camel-swagger feature is not working that great in Karaf.
      In a blueprint camel route using camel-rest, you should be able add swagger api-docs using the following XML:

         <service interface="javax.servlet.http.HttpServlet">
             <service-properties>
                 <entry key="alias" value="/api-docs/*"/>
             </service-properties>
             <bean class="org.apache.camel.component.swagger.DefaultCamelSwaggerServlet"/>
         </service>    
      

      But then you run into the following error when you access 'http://localhost:8181/api-docs/'

      java.lang.SecurityException: Insufficient roles/credentials for operation

      Disabling RBAC or adding to

      etc/auth/jmx.acl.org.apache.camel.context.cfg


      the following should get you past that:

      dumpRestsAsXml = *

      But then I run into:

      java.lang.NoSuchMethodError: com.wordnik.swagger.model.ApiDescription$.apply$default$4()Z
      	at org.apache.camel.component.swagger.RestSwaggerReader$$anonfun$read$2.apply(RestSwaggerReader.scala:74)
      	at org.apache.camel.component.swagger.RestSwaggerReader$$anonfun$read$2.apply(RestSwaggerReader.scala:70)
      	at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
      	at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
      	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
      	at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
      	at org.apache.camel.component.swagger.RestSwaggerReader.read(RestSwaggerReader.scala:70)
      	at org.apache.camel.component.swagger.RestApiListingCache$$anonfun$listing$1$$anonfun$apply$1.apply(RestApiListingCache.scala:42)
      

      Attachments

        Issue Links

          Activity

            People

              ggrzybek Grzegorz Grzybek
              hchirino Hiram Chirino
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: