git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Camel Swagger Implementation


Hi

Camel uses swagger to generate the json file, and its tied to be
Swagger 2.0 spec with the version of swagger we use.

To support 3.0 we would need to upgrade the swagger library, and
potential do migration as its potentially not a drop in replacement.

I logged a ticket so support 3.0 spec in a future Camel release
https://issues.apache.org/jira/browse/CAMEL-12619

The swagger.json name is hardcoded and cannot be changed at the moment.
We can consider allowing to customize it so you can specific a
different name, if so then log a JIRA at upstream






On Wed, Jun 27, 2018 at 3:18 PM, Bikash Kaushik
<kaushikbikash28@xxxxxxxxx> wrote:
> Yes , I have done this.
> But I need to do some configuration in swagger as mentioned in trail mail.
> I'm facing issue in those changes.
>
> Thanks.
>
> On Wed, Jun 27, 2018, 4:55 PM Bennet Schulz <mail@xxxxxxxxxxxxxxxx> wrote:
>
>> Hi Bikash,
>>
>> are you using the Camel Swagger component?
>> https://github.com/apache/camel/tree/master/components/camel-swagger <
>> https://github.com/apache/camel/tree/master/components/camel-swagger>
>> I think the easiest way is to use this one. Just checkout the code and
>> take a look at it.
>>
>> best regards,
>> Bennet
>>
>> > On 26. Jun 2018, at 6:25 PM, Bikash Kaushik <kaushikbikash28@xxxxxxxxx>
>> wrote:
>> >
>> > Hi everybody,
>> >
>> > I'm implementing swagger in my camel rest project. It is working fine
>> but I
>> > have to implement more options like :
>> >
>> > *1. By default swagger version is 2.0 , change it to 3.0.*
>> > *2. By default generated swagger document is by name "swagger.json",
>> change
>> > it according to project name.*
>> > *3. Define multiple port in swagger rest-configuration.*
>> > *4. Read pom.xml value in my blueprint.xml.*
>> > *5. Where is location of "swagger.json"?*
>> >
>> > *Details :*
>> > *Fuse Version : 6.3*
>> > *Camel Version : 2.17.0.redhat-630187*
>> >
>> > *Rest Configuration :*
>> > <restConfiguration apiContextListing="true"
>> >            apiContextPath="api-docs" bindingMode="json"
>> >            component="jetty" contextPath="api"
>> >            host="127.0.0.1" port="9544" scheme="http">
>> >            <!-- we want json output in pretty mode -->
>> >            <dataFormatProperty key="prettyPrint" value="true"/>
>> >            <!-- setup swagger api descriptions -->
>> >            <apiProperty key="base.path" value="project"/>
>> >            <apiProperty key="api.version" value="1.0.0"/>
>> >            <apiProperty key="api.title" value="Sample Project"/>
>> >            <apiProperty key="api.description" value="Camel Rest Swagger
>> > that provides an details of sample project"/>
>> >        </restConfiguration>
>> >
>> >
>> > *@Kindly help.*
>> > *Thanks.*
>> >
>> > --
>> >
>> >
>> > *Regards,*
>> > *Bikash Kaushik,*
>> > *NIT Jamshedpur*
>>
>>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03475.html on line 166
Call Stack
#TimeMemoryFunctionLocation
10.0007368664{main}( ).../msg03475.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03475.html on line 166
Call Stack
#TimeMemoryFunctionLocation
10.0007368664{main}( ).../msg03475.html:0