0

How can we integrate camel with springfox for swagger api generation? I'm not sure if it's possible. Currently we are using camel-swagger-java component, but is not flexible enough for our use case below. As per my understanding springfox expects the rest paths to be definedin spring controller

We're using basic authentication for our service, and the the paths are defined through XML, need the securityDefinitions in generated api. camel-swagger-java doesn't allow this to be configured, it seems. This is how our current setup looks like

    <restConfiguration component="jetty" bindingMode="json" contextPath="/" port="8080" apiContextPath="/api-doc" host="0.0.0.0">
       <apiProperty key="api.title" value="Title"/>
    </restConfiguration>

    <rest path="" consumes="application/json" produces="application/json">
       <description>xyz</description>
        <post uri="query" type="com.myRequest"  outType=com.myResponse">
            <description>abc</description>
            <to uri="direct-vm:someRoute"/>
        </post>
    </rest>

Any help greatly appreciated

slashron
  • 277
  • 1
  • 4
  • 13
  • Maybe you can tell more about what flexibility you need. – Claus Ibsen Jul 12 '17 at 17:47
  • Added the details , thanks – slashron Jul 13 '17 at 06:33
  • 1
    Okay see this ticket about adding support for security details in the rest-dsl: https://issues.apache.org/jira/browse/CAMEL-9751 – Claus Ibsen Jul 13 '17 at 10:36
  • thanks @Claus, but we need to wait till 2.20.0 release I guess. Is there any known alternative? Still wonder why isn't this feature there in the first place, as it seems to me as a common use case – slashron Jul 14 '17 at 07:44
  • 1
    There are only 24hours per day and people have a lot to work on as well - and a life to live. Many open source projects appreciate contributions. So step up to the plate yourself etc and contribute such functionality: http://camel.apache.org/contributing – Claus Ibsen Jul 14 '17 at 07:47
  • 1
    sure, i'll give it a try – slashron Jul 17 '17 at 17:48

0 Answers0