You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by nino martinez wael <ni...@gmail.com> on 2017/04/06 06:04:30 UTC

DOSGI 2 prefered documentation technique?

Hi Guys

I've been contemplating on documentation. Currently we've gone down the
offline documentation road, using enunciate[1] while it feels okay I've
seen that CXF supports other directions natively[2]. I am wondering if its
possible to use those with DOSGI?



[1]http://enunciate.webcohesion.com/
[2]http://cxf.apache.org/docs/swagger2feature.html



-- 
Best regards / Med venlig hilsen
Nino Martinez

RE: DOSGI 2 prefered documentation technique?

Posted by Graeme Hill <Gr...@empired.com>.
unsubscribe

-----Original Message-----
From: cschneider111@gmail.com [mailto:cschneider111@gmail.com] On Behalf Of Christian Schneider
Sent: Monday, 24 April 2017 12:53 PM
To: users@cxf.apache.org
Subject: Re: DOSGI 2 prefered documentation technique?

I also had this problem but was not able to pin it down to the missing host. ( I am not very familiar with swagger).
Based on your findings I hope e can find a good solution to this.

Can you post your code for the CustomSwagger2Serializers. If you wat you can also create a PR in cxf to fix the issue.

Christian

2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:

> Hi sorry to resurrect this thread but I've a similar problem which was 
> not completely solved with this approach,
>
> First I've managed to make dosgi work with swagger with a:
>
>                 setScan(false);
>                 setUsePathBasedConfig(true);
>
> in the swagger feature. It all works well except the "Try it out" of 
> the swagger ui. I'm using the latest version (mvn:org.webjars/swagger-ui/3.
> 0.5)
> and I've noticed that in the swagger.json the host is not filled. This 
> host is used to build the url. The cxf feature does not set the host 
> no matter what I do or change.
>
> I ended up hammering an ugly solution by setting a custom swagger2 
> serializer
>
> setSwagger2Serializers(new CustomSwagger2Serializers());
>
> where I'm able to extract the servlet request thus setting the 
> host:port
>
> I'm I missing something here or this is indeed a problema at least 
> with the latest swagger ui version (It seems odd also that the swagger 
> 2 ui does no use by default the current url but it didn't work in my tests) ?
>
> Tnks,
> Ivo Leitão
>
>
>
> --
> View this message in context: https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcxf.547215.n5.nabble&data=01%7C01%7CGraeme.Hill%40empired.com%7C620c2b00587f4988540c08d48ae5a306%7Cb1ac35c5fd1143baa811f82cc883731f%7C0&sdata=kIV4%2FtUYnROIxemMn8%2BTJjE2ftq0u79tWfNsDV8jEAY%3D&reserved=0.
> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



--
--
Christian Schneider
https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.liquid-reality.de&data=01%7C01%7CGraeme.Hill%40empired.com%7C620c2b00587f4988540c08d48ae5a306%7Cb1ac35c5fd1143baa811f82cc883731f%7C0&sdata=L2SZv4qW3WkJJN0z9yqecCcMbfu3RpQvl%2B%2FmbyMxqJQ%3D&reserved=0
<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fowa.talend.com%2Fowa%2Fredir.aspx%3FC%3D3aa4083e0c744ae1ba52bd062c5a7e46%26URL%3Dhttp%253a%252f%252fwww.liquid-reality.de&data=01%7C01%7CGraeme.Hill%40empired.com%7C620c2b00587f4988540c08d48ae5a306%7Cb1ac35c5fd1143baa811f82cc883731f%7C0&sdata=rJxf6yuKFk1PModH0axa38GYVbZG4bTySE2BqhtFE%2Fc%3D&reserved=0>

Open Source Architect
https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.talend.com&data=01%7C01%7CGraeme.Hill%40empired.com%7C620c2b00587f4988540c08d48ae5a306%7Cb1ac35c5fd1143baa811f82cc883731f%7C0&sdata=nv2e%2FGBTSl2f2Y%2Bg7dmmShjEaiEMNd8nYF%2FTmvJp7Yk%3D&reserved=0
<https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fowa.talend.com%2Fowa%2Fredir.aspx%3FC%3D3aa4083e0c744ae1ba52bd062c5a7e46%26URL%3Dhttp%253a%252f%252fwww.talend.com&data=01%7C01%7CGraeme.Hill%40empired.com%7C620c2b00587f4988540c08d48ae5a306%7Cb1ac35c5fd1143baa811f82cc883731f%7C0&sdata=DY9DempEENoZWeHRcadbjceXw58RJ9baCAHcoPTUX6o%3D&reserved=0>

Re: DOSGI 2 prefered documentation technique?

Posted by Sergey Beryozkin <sb...@gmail.com>.
So why is the root not found ? I can only imagine Swagger Ui is not 
installed...

Sergey
On 22/06/17 13:07, nino martinez wael wrote:
> Sorry I was wrong it is 3.1.11..
> 
> On Wed, Jun 21, 2017 at 4:38 PM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
> 
>> It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release
>>
>> Sergey
>>
>> On 21/06/17 14:37, nino martinez wael wrote:
>>
>>> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
>>> swagger cxf module.. would that be a problme?
>>>
>>> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
>>> nino.martinez.wael@gmail.com> wrote:
>>>
>>> SwaggerUIVersion ends up being null. It goes through all the checks.. Do I
>>>> need to declare that version somewhere?
>>>>
>>>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>>>> nino.martinez.wael@gmail.com> wrote:
>>>>
>>>> Yes I will try so.. ASAP..
>>>>>
>>>>> -Thanks
>>>>>
>>>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <
>>>>> sberyozkin@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hi
>>>>>>
>>>>>> Can you put a breakpoint here:
>>>>>>
>>>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>>>> waggerUiResolver.java#L38
>>>>>>
>>>>>> Cheers, Sergey
>>>>>>
>>>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>>>
>>>>>> I think I need both..
>>>>>>>
>>>>>>> Problem are that I run into the CORS problem since we have begun to
>>>>>>> host
>>>>>>> our DOSGI service on another port, and the only way to get SWAGGER ui
>>>>>>> to
>>>>>>> function correctly would be to host it alongside the webservice..
>>>>>>>
>>>>>>> Did you try with an older release of swagger..? I just dont know what
>>>>>>> I
>>>>>>> need to add for CXF to activate swager ui, I've put in
>>>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger
>>>>>>> swagger-ui
>>>>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>>>>> But
>>>>>>> nothing shows up at my version of "http://host:port/context/services/
>>>>>>> api-docs?/url=/swagger.json"..
>>>>>>>
>>>>>>>
>>>>>>> Place I've looked:
>>>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>
>>>>>>> I worked on a better swagger integration a while ago but also failed
>>>>>>> at
>>>>>>>
>>>>>>>> the
>>>>>>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>>>>>>> support with the new swagger versions.
>>>>>>>> There are some interesting enhancements in the current DOSGi master
>>>>>>>> so
>>>>>>>> we
>>>>>>>> could do a release soon.
>>>>>>>> It would be great to also include swagger support but I would also
>>>>>>>> not
>>>>>>>> mind
>>>>>>>> to move swagger support to 2.3.0.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>>>>> nino.martinez.wael@gmail.com>
>>>>>>>> :
>>>>>>>>
>>>>>>>> Hi Christian,
>>>>>>>>
>>>>>>>>>
>>>>>>>>> I seem to remember that I can get the SWAGGER UI bundled together
>>>>>>>>> with
>>>>>>>>>
>>>>>>>>> the
>>>>>>>>
>>>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>>>>
>>>>>>>>> api-docs
>>>>>>>>
>>>>>>>> to my resource url. But it isnt working.
>>>>>>>>>
>>>>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>>>>> swagger
>>>>>>>>> ui document.
>>>>>>>>>
>>>>>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>>>>>> sberyozkin@gmail.com
>>>>>>>>>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> According to
>>>>>>>>>
>>>>>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>>>>>
>>>>>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>>>>>
>>>>>>>>>> Thanks, Sergey
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>>>>>
>>>>>>>>>> I also had this problem but was not able to pin it down to the
>>>>>>>>>>
>>>>>>>>>>> missing
>>>>>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>>>>>
>>>>>>>>>>> Can you post your code for the CustomSwagger2Serializers. If you
>>>>>>>>>>> wat
>>>>>>>>>>>
>>>>>>>>>>> you
>>>>>>>>>>
>>>>>>>>>
>>>>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Christian
>>>>>>>>>>>
>>>>>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> Hi sorry to resurrect this thread but I've a similar problem which
>>>>>>>>>>> was
>>>>>>>>>>>
>>>>>>>>>>> not
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> completely solved with this approach,
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>>>>>>
>>>>>>>>>>>>                    setScan(false);
>>>>>>>>>>>>                    setUsePathBasedConfig(true);
>>>>>>>>>>>>
>>>>>>>>>>>> in the swagger feature. It all works well except the "Try it out"
>>>>>>>>>>>> of
>>>>>>>>>>>>
>>>>>>>>>>>> the
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> swagger ui. I'm using the latest version
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> 0.5)
>>>>>>>>>
>>>>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>>>>>>
>>>>>>>>>>>> This
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> host
>>>>>>>>>
>>>>>>>>>> is used to build the url. The cxf feature does not set the host no
>>>>>>>>>>>>
>>>>>>>>>>>> matter
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> what I do or change.
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> I ended up hammering an ugly solution by setting a custom
>>>>>>>>>>>> swagger2
>>>>>>>>>>>> serializer
>>>>>>>>>>>>
>>>>>>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>>>>>>
>>>>>>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>>>>>>
>>>>>>>>>>>> host:port
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> I'm I missing something here or this is indeed a problema at least
>>>>>>>>>>>>
>>>>>>>>>>>> with
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> the
>>>>>>>>>
>>>>>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>>>>>>>>>>>>
>>>>>>>>>>>> does
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> no
>>>>>>>>>
>>>>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>>>>>>
>>>>>>>>>>>> Tnks,
>>>>>>>>>>>> Ivo Leitão
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p57798
>>>>>>>>>>>> 47.html
>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>> Sergey Beryozkin
>>>>>>>>>>
>>>>>>>>>> Talend Community Coders
>>>>>>>>>> http://coders.talend.com/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>> Nino Martinez
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> --
>>>>>>>> Christian Schneider
>>>>>>>> http://www.liquid-reality.de
>>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>>> 2bd062c5a7e
>>>>>>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>>>>>>
>>>>>>>> Open Source Architect
>>>>>>>> http://www.talend.com
>>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>>> 2bd062c5a7e
>>>>>>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>>
>>>
>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
> 
> 
> 


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
I got it working, it was because of the old cxf core version...

Thanks for the help :)

On Thu, Jun 22, 2017 at 2:10 PM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> May be it is installed after the checks are done ?
>
>
> On 22/06/17 13:08, nino martinez wael wrote:
>
>> I've put this in my feature file: <bundle>
>> wrap:mvn:org.webjars/swagger-ui/2.2.10</bundle>
>>
>> On Thu, Jun 22, 2017 at 2:07 PM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>> Sorry I was wrong it is 3.1.11..
>>>
>>> On Wed, Jun 21, 2017 at 4:38 PM, Sergey Beryozkin <sb...@gmail.com>
>>> wrote:
>>>
>>> It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release
>>>>
>>>> Sergey
>>>>
>>>> On 21/06/17 14:37, nino martinez wael wrote:
>>>>
>>>> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of
>>>>> the
>>>>> swagger cxf module.. would that be a problme?
>>>>>
>>>>> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>
>>>>> SwaggerUIVersion ends up being null. It goes through all the checks..
>>>>> Do
>>>>>
>>>>>> I
>>>>>> need to declare that version somewhere?
>>>>>>
>>>>>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>
>>>>>> Yes I will try so.. ASAP..
>>>>>>
>>>>>>>
>>>>>>> -Thanks
>>>>>>>
>>>>>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <
>>>>>>> sberyozkin@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>>>
>>>>>>>> Can you put a breakpoint here:
>>>>>>>>
>>>>>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>>>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>>>>>> waggerUiResolver.java#L38
>>>>>>>>
>>>>>>>> Cheers, Sergey
>>>>>>>>
>>>>>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>>>>>
>>>>>>>> I think I need both..
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Problem are that I run into the CORS problem since we have begun to
>>>>>>>>> host
>>>>>>>>> our DOSGI service on another port, and the only way to get SWAGGER
>>>>>>>>> ui to
>>>>>>>>> function correctly would be to host it alongside the webservice..
>>>>>>>>>
>>>>>>>>> Did you try with an older release of swagger..? I just dont know
>>>>>>>>> what I
>>>>>>>>> need to add for CXF to activate swager ui, I've put in
>>>>>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger
>>>>>>>>> swagger-ui
>>>>>>>>> activation as far as I can see, combined with
>>>>>>>>> supportSwaggerUi=true..
>>>>>>>>> But
>>>>>>>>> nothing shows up at my version of "http://host:port/context/serv
>>>>>>>>> ices/
>>>>>>>>> api-docs?/url=/swagger.json"..
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Place I've looked:
>>>>>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>>
>>>>>>>>> I worked on a better swagger integration a while ago but also
>>>>>>>>> failed
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> the
>>>>>>>>>> UI. At that time I think it was an incompatibility of the cxf
>>>>>>>>>> swagger
>>>>>>>>>> support with the new swagger versions.
>>>>>>>>>> There are some interesting enhancements in the current DOSGi
>>>>>>>>>> master
>>>>>>>>>> so
>>>>>>>>>> we
>>>>>>>>>> could do a release soon.
>>>>>>>>>> It would be great to also include swagger support but I would also
>>>>>>>>>> not
>>>>>>>>>> mind
>>>>>>>>>> to move swagger support to 2.3.0.
>>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>>>>>>> nino.martinez.wael@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> Hi Christian,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> I seem to remember that I can get the SWAGGER UI bundled together
>>>>>>>>>>> with
>>>>>>>>>>>
>>>>>>>>>>> the
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> api-docs
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> to my resource url. But it isnt working.
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>>>>>>> swagger
>>>>>>>>>>> ui document.
>>>>>>>>>>>
>>>>>>>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>>>>>>>> sberyozkin@gmail.com
>>>>>>>>>>>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> According to
>>>>>>>>>>>
>>>>>>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>>>>>>>
>>>>>>>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>>>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks, Sergey
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> I also had this problem but was not able to pin it down to the
>>>>>>>>>>>>
>>>>>>>>>>>> missing
>>>>>>>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>>>>>>>> Based on your findings I hope e can find a good solution to
>>>>>>>>>>>>> this.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Can you post your code for the CustomSwagger2Serializers. If
>>>>>>>>>>>>> you
>>>>>>>>>>>>> wat
>>>>>>>>>>>>>
>>>>>>>>>>>>> you
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Christian
>>>>>>>>>>>>>
>>>>>>>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi sorry to resurrect this thread but I've a similar problem
>>>>>>>>>>>>> which
>>>>>>>>>>>>> was
>>>>>>>>>>>>>
>>>>>>>>>>>>> not
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> completely solved with this approach,
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                    setScan(false);
>>>>>>>>>>>>>>                    setUsePathBasedConfig(true);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> in the swagger feature. It all works well except the "Try it
>>>>>>>>>>>>>> out"
>>>>>>>>>>>>>> of
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> swagger ui. I'm using the latest version
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> 0.5)
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> This
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> host
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> is used to build the url. The cxf feature does not set the host
>>>>>>>>>>>> no
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> matter
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> what I do or change.
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> I ended up hammering an ugly solution by setting a custom
>>>>>>>>>>>>>> swagger2
>>>>>>>>>>>>>> serializer
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> host:port
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> I'm I missing something here or this is indeed a problema at
>>>>>>>>>>>> least
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> with
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> the
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> latest swagger ui version (It seems odd also that the swagger 2
>>>>>>>>>>>> ui
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> does
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> no
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Tnks,
>>>>>>>>>>>>>> Ivo Leitão
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>>>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p57798
>>>>>>>>>>>>>> 47.html
>>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>>
>>>>>>>>>>>> Sergey Beryozkin
>>>>>>>>>>>>
>>>>>>>>>>>> Talend Community Coders
>>>>>>>>>>>> http://coders.talend.com/
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>>>> Nino Martinez
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> --
>>>>>>>>>> Christian Schneider
>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>>>>> 2bd062c5a7e
>>>>>>>>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>>>>>>>>
>>>>>>>>>> Open Source Architect
>>>>>>>>>> http://www.talend.com
>>>>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>>>>> 2bd062c5a7e
>>>>>>>>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>> --
>>>>>>> Best regards / Med venlig hilsen
>>>>>>> Nino Martinez
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards / Med venlig hilsen
>>>>>> Nino Martinez
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>>
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Sergey Beryozkin <sb...@gmail.com>.
May be it is installed after the checks are done ?

On 22/06/17 13:08, nino martinez wael wrote:
> I've put this in my feature file: <bundle>
> wrap:mvn:org.webjars/swagger-ui/2.2.10</bundle>
> 
> On Thu, Jun 22, 2017 at 2:07 PM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
> 
>> Sorry I was wrong it is 3.1.11..
>>
>> On Wed, Jun 21, 2017 at 4:38 PM, Sergey Beryozkin <sb...@gmail.com>
>> wrote:
>>
>>> It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release
>>>
>>> Sergey
>>>
>>> On 21/06/17 14:37, nino martinez wael wrote:
>>>
>>>> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
>>>> swagger cxf module.. would that be a problme?
>>>>
>>>> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
>>>> nino.martinez.wael@gmail.com> wrote:
>>>>
>>>> SwaggerUIVersion ends up being null. It goes through all the checks.. Do
>>>>> I
>>>>> need to declare that version somewhere?
>>>>>
>>>>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>
>>>>> Yes I will try so.. ASAP..
>>>>>>
>>>>>> -Thanks
>>>>>>
>>>>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <
>>>>>> sberyozkin@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> Hi
>>>>>>>
>>>>>>> Can you put a breakpoint here:
>>>>>>>
>>>>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>>>>> waggerUiResolver.java#L38
>>>>>>>
>>>>>>> Cheers, Sergey
>>>>>>>
>>>>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>>>>
>>>>>>> I think I need both..
>>>>>>>>
>>>>>>>> Problem are that I run into the CORS problem since we have begun to
>>>>>>>> host
>>>>>>>> our DOSGI service on another port, and the only way to get SWAGGER
>>>>>>>> ui to
>>>>>>>> function correctly would be to host it alongside the webservice..
>>>>>>>>
>>>>>>>> Did you try with an older release of swagger..? I just dont know
>>>>>>>> what I
>>>>>>>> need to add for CXF to activate swager ui, I've put in
>>>>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger
>>>>>>>> swagger-ui
>>>>>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>>>>>> But
>>>>>>>> nothing shows up at my version of "http://host:port/context/serv
>>>>>>>> ices/
>>>>>>>> api-docs?/url=/swagger.json"..
>>>>>>>>
>>>>>>>>
>>>>>>>> Place I've looked:
>>>>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>
>>>>>>>> I worked on a better swagger integration a while ago but also failed
>>>>>>>> at
>>>>>>>>
>>>>>>>>> the
>>>>>>>>> UI. At that time I think it was an incompatibility of the cxf
>>>>>>>>> swagger
>>>>>>>>> support with the new swagger versions.
>>>>>>>>> There are some interesting enhancements in the current DOSGi master
>>>>>>>>> so
>>>>>>>>> we
>>>>>>>>> could do a release soon.
>>>>>>>>> It would be great to also include swagger support but I would also
>>>>>>>>> not
>>>>>>>>> mind
>>>>>>>>> to move swagger support to 2.3.0.
>>>>>>>>>
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>>>>>> nino.martinez.wael@gmail.com>
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> Hi Christian,
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I seem to remember that I can get the SWAGGER UI bundled together
>>>>>>>>>> with
>>>>>>>>>>
>>>>>>>>>> the
>>>>>>>>>
>>>>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>>>>>
>>>>>>>>>> api-docs
>>>>>>>>>
>>>>>>>>> to my resource url. But it isnt working.
>>>>>>>>>>
>>>>>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>>>>>> swagger
>>>>>>>>>> ui document.
>>>>>>>>>>
>>>>>>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>>>>>>> sberyozkin@gmail.com
>>>>>>>>>>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> According to
>>>>>>>>>>
>>>>>>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>>>>>>
>>>>>>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>>>>>>
>>>>>>>>>>> Thanks, Sergey
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>>>>>>
>>>>>>>>>>> I also had this problem but was not able to pin it down to the
>>>>>>>>>>>
>>>>>>>>>>>> missing
>>>>>>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>>>>>>
>>>>>>>>>>>> Can you post your code for the CustomSwagger2Serializers. If you
>>>>>>>>>>>> wat
>>>>>>>>>>>>
>>>>>>>>>>>> you
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Christian
>>>>>>>>>>>>
>>>>>>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi sorry to resurrect this thread but I've a similar problem
>>>>>>>>>>>> which
>>>>>>>>>>>> was
>>>>>>>>>>>>
>>>>>>>>>>>> not
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> completely solved with this approach,
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>>>>>>>
>>>>>>>>>>>>>                    setScan(false);
>>>>>>>>>>>>>                    setUsePathBasedConfig(true);
>>>>>>>>>>>>>
>>>>>>>>>>>>> in the swagger feature. It all works well except the "Try it
>>>>>>>>>>>>> out"
>>>>>>>>>>>>> of
>>>>>>>>>>>>>
>>>>>>>>>>>>> the
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> swagger ui. I'm using the latest version
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>> 0.5)
>>>>>>>>>>
>>>>>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>>>>>>>
>>>>>>>>>>>>> This
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>> host
>>>>>>>>>>
>>>>>>>>>>> is used to build the url. The cxf feature does not set the host no
>>>>>>>>>>>>>
>>>>>>>>>>>>> matter
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> what I do or change.
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> I ended up hammering an ugly solution by setting a custom
>>>>>>>>>>>>> swagger2
>>>>>>>>>>>>> serializer
>>>>>>>>>>>>>
>>>>>>>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>>>>>>>
>>>>>>>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>>>>>>>
>>>>>>>>>>>>> host:port
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> I'm I missing something here or this is indeed a problema at least
>>>>>>>>>>>>>
>>>>>>>>>>>>> with
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>> the
>>>>>>>>>>
>>>>>>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>>>>>>>>>>>>>
>>>>>>>>>>>>> does
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>> no
>>>>>>>>>>
>>>>>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Tnks,
>>>>>>>>>>>>> Ivo Leitão
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p57798
>>>>>>>>>>>>> 47.html
>>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>> Sergey Beryozkin
>>>>>>>>>>>
>>>>>>>>>>> Talend Community Coders
>>>>>>>>>>> http://coders.talend.com/
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>>> Nino Martinez
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> --
>>>>>>>>> Christian Schneider
>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>>>> 2bd062c5a7e
>>>>>>>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>>>>>>>
>>>>>>>>> Open Source Architect
>>>>>>>>> http://www.talend.com
>>>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>>>> 2bd062c5a7e
>>>>>>>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards / Med venlig hilsen
>>>>>> Nino Martinez
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
> 
> 
> 


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
I've put this in my feature file: <bundle>
wrap:mvn:org.webjars/swagger-ui/2.2.10</bundle>

On Thu, Jun 22, 2017 at 2:07 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> Sorry I was wrong it is 3.1.11..
>
> On Wed, Jun 21, 2017 at 4:38 PM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
>
>> It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release
>>
>> Sergey
>>
>> On 21/06/17 14:37, nino martinez wael wrote:
>>
>>> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
>>> swagger cxf module.. would that be a problme?
>>>
>>> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
>>> nino.martinez.wael@gmail.com> wrote:
>>>
>>> SwaggerUIVersion ends up being null. It goes through all the checks.. Do
>>>> I
>>>> need to declare that version somewhere?
>>>>
>>>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>>>> nino.martinez.wael@gmail.com> wrote:
>>>>
>>>> Yes I will try so.. ASAP..
>>>>>
>>>>> -Thanks
>>>>>
>>>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <
>>>>> sberyozkin@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hi
>>>>>>
>>>>>> Can you put a breakpoint here:
>>>>>>
>>>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>>>> waggerUiResolver.java#L38
>>>>>>
>>>>>> Cheers, Sergey
>>>>>>
>>>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>>>
>>>>>> I think I need both..
>>>>>>>
>>>>>>> Problem are that I run into the CORS problem since we have begun to
>>>>>>> host
>>>>>>> our DOSGI service on another port, and the only way to get SWAGGER
>>>>>>> ui to
>>>>>>> function correctly would be to host it alongside the webservice..
>>>>>>>
>>>>>>> Did you try with an older release of swagger..? I just dont know
>>>>>>> what I
>>>>>>> need to add for CXF to activate swager ui, I've put in
>>>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger
>>>>>>> swagger-ui
>>>>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>>>>> But
>>>>>>> nothing shows up at my version of "http://host:port/context/serv
>>>>>>> ices/
>>>>>>> api-docs?/url=/swagger.json"..
>>>>>>>
>>>>>>>
>>>>>>> Place I've looked:
>>>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>
>>>>>>> I worked on a better swagger integration a while ago but also failed
>>>>>>> at
>>>>>>>
>>>>>>>> the
>>>>>>>> UI. At that time I think it was an incompatibility of the cxf
>>>>>>>> swagger
>>>>>>>> support with the new swagger versions.
>>>>>>>> There are some interesting enhancements in the current DOSGi master
>>>>>>>> so
>>>>>>>> we
>>>>>>>> could do a release soon.
>>>>>>>> It would be great to also include swagger support but I would also
>>>>>>>> not
>>>>>>>> mind
>>>>>>>> to move swagger support to 2.3.0.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>>>>> nino.martinez.wael@gmail.com>
>>>>>>>> :
>>>>>>>>
>>>>>>>> Hi Christian,
>>>>>>>>
>>>>>>>>>
>>>>>>>>> I seem to remember that I can get the SWAGGER UI bundled together
>>>>>>>>> with
>>>>>>>>>
>>>>>>>>> the
>>>>>>>>
>>>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>>>>
>>>>>>>>> api-docs
>>>>>>>>
>>>>>>>> to my resource url. But it isnt working.
>>>>>>>>>
>>>>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>>>>> swagger
>>>>>>>>> ui document.
>>>>>>>>>
>>>>>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>>>>>> sberyozkin@gmail.com
>>>>>>>>>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> According to
>>>>>>>>>
>>>>>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>>>>>
>>>>>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>>>>>
>>>>>>>>>> Thanks, Sergey
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>>>>>
>>>>>>>>>> I also had this problem but was not able to pin it down to the
>>>>>>>>>>
>>>>>>>>>>> missing
>>>>>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>>>>>
>>>>>>>>>>> Can you post your code for the CustomSwagger2Serializers. If you
>>>>>>>>>>> wat
>>>>>>>>>>>
>>>>>>>>>>> you
>>>>>>>>>>
>>>>>>>>>
>>>>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Christian
>>>>>>>>>>>
>>>>>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> Hi sorry to resurrect this thread but I've a similar problem
>>>>>>>>>>> which
>>>>>>>>>>> was
>>>>>>>>>>>
>>>>>>>>>>> not
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> completely solved with this approach,
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>>>>>>
>>>>>>>>>>>>                   setScan(false);
>>>>>>>>>>>>                   setUsePathBasedConfig(true);
>>>>>>>>>>>>
>>>>>>>>>>>> in the swagger feature. It all works well except the "Try it
>>>>>>>>>>>> out"
>>>>>>>>>>>> of
>>>>>>>>>>>>
>>>>>>>>>>>> the
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> swagger ui. I'm using the latest version
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> 0.5)
>>>>>>>>>
>>>>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>>>>>>
>>>>>>>>>>>> This
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> host
>>>>>>>>>
>>>>>>>>>> is used to build the url. The cxf feature does not set the host no
>>>>>>>>>>>>
>>>>>>>>>>>> matter
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> what I do or change.
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> I ended up hammering an ugly solution by setting a custom
>>>>>>>>>>>> swagger2
>>>>>>>>>>>> serializer
>>>>>>>>>>>>
>>>>>>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>>>>>>
>>>>>>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>>>>>>
>>>>>>>>>>>> host:port
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> I'm I missing something here or this is indeed a problema at least
>>>>>>>>>>>>
>>>>>>>>>>>> with
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> the
>>>>>>>>>
>>>>>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>>>>>>>>>>>>
>>>>>>>>>>>> does
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> no
>>>>>>>>>
>>>>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>>>>>>
>>>>>>>>>>>> Tnks,
>>>>>>>>>>>> Ivo Leitão
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p57798
>>>>>>>>>>>> 47.html
>>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>> Sergey Beryozkin
>>>>>>>>>>
>>>>>>>>>> Talend Community Coders
>>>>>>>>>> http://coders.talend.com/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>> Nino Martinez
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> --
>>>>>>>> Christian Schneider
>>>>>>>> http://www.liquid-reality.de
>>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>>> 2bd062c5a7e
>>>>>>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>>>>>>
>>>>>>>> Open Source Architect
>>>>>>>> http://www.talend.com
>>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>>> 2bd062c5a7e
>>>>>>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>>
>>>
>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
Sorry I was wrong it is 3.1.11..

On Wed, Jun 21, 2017 at 4:38 PM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release
>
> Sergey
>
> On 21/06/17 14:37, nino martinez wael wrote:
>
>> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
>> swagger cxf module.. would that be a problme?
>>
>> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>> SwaggerUIVersion ends up being null. It goes through all the checks.. Do I
>>> need to declare that version somewhere?
>>>
>>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>>> nino.martinez.wael@gmail.com> wrote:
>>>
>>> Yes I will try so.. ASAP..
>>>>
>>>> -Thanks
>>>>
>>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <
>>>> sberyozkin@gmail.com>
>>>> wrote:
>>>>
>>>> Hi
>>>>>
>>>>> Can you put a breakpoint here:
>>>>>
>>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>>> waggerUiResolver.java#L38
>>>>>
>>>>> Cheers, Sergey
>>>>>
>>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>>
>>>>> I think I need both..
>>>>>>
>>>>>> Problem are that I run into the CORS problem since we have begun to
>>>>>> host
>>>>>> our DOSGI service on another port, and the only way to get SWAGGER ui
>>>>>> to
>>>>>> function correctly would be to host it alongside the webservice..
>>>>>>
>>>>>> Did you try with an older release of swagger..? I just dont know what
>>>>>> I
>>>>>> need to add for CXF to activate swager ui, I've put in
>>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger
>>>>>> swagger-ui
>>>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>>>> But
>>>>>> nothing shows up at my version of "http://host:port/context/services/
>>>>>> api-docs?/url=/swagger.json"..
>>>>>>
>>>>>>
>>>>>> Place I've looked:
>>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>>> chris@die-schneider.net> wrote:
>>>>>>
>>>>>> I worked on a better swagger integration a while ago but also failed
>>>>>> at
>>>>>>
>>>>>>> the
>>>>>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>>>>>> support with the new swagger versions.
>>>>>>> There are some interesting enhancements in the current DOSGi master
>>>>>>> so
>>>>>>> we
>>>>>>> could do a release soon.
>>>>>>> It would be great to also include swagger support but I would also
>>>>>>> not
>>>>>>> mind
>>>>>>> to move swagger support to 2.3.0.
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>>>> nino.martinez.wael@gmail.com>
>>>>>>> :
>>>>>>>
>>>>>>> Hi Christian,
>>>>>>>
>>>>>>>>
>>>>>>>> I seem to remember that I can get the SWAGGER UI bundled together
>>>>>>>> with
>>>>>>>>
>>>>>>>> the
>>>>>>>
>>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>>>
>>>>>>>> api-docs
>>>>>>>
>>>>>>> to my resource url. But it isnt working.
>>>>>>>>
>>>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>>>> swagger
>>>>>>>> ui document.
>>>>>>>>
>>>>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>>>>> sberyozkin@gmail.com
>>>>>>>>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> According to
>>>>>>>>
>>>>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>>>>
>>>>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>>>>
>>>>>>>>> Thanks, Sergey
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>>>>
>>>>>>>>> I also had this problem but was not able to pin it down to the
>>>>>>>>>
>>>>>>>>>> missing
>>>>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>>>>
>>>>>>>>>> Can you post your code for the CustomSwagger2Serializers. If you
>>>>>>>>>> wat
>>>>>>>>>>
>>>>>>>>>> you
>>>>>>>>>
>>>>>>>>
>>>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>>>>>
>>>>>>>>>> Hi sorry to resurrect this thread but I've a similar problem which
>>>>>>>>>> was
>>>>>>>>>>
>>>>>>>>>> not
>>>>>>>>>
>>>>>>>>
>>>>>>>> completely solved with this approach,
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>>>>>
>>>>>>>>>>>                   setScan(false);
>>>>>>>>>>>                   setUsePathBasedConfig(true);
>>>>>>>>>>>
>>>>>>>>>>> in the swagger feature. It all works well except the "Try it out"
>>>>>>>>>>> of
>>>>>>>>>>>
>>>>>>>>>>> the
>>>>>>>>>>
>>>>>>>>>
>>>>>>>> swagger ui. I'm using the latest version
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>>>>>>>>
>>>>>>>>>
>>>>>>> 0.5)
>>>>>>>>
>>>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>>>>>
>>>>>>>>>>> This
>>>>>>>>>>
>>>>>>>>>
>>>>>>> host
>>>>>>>>
>>>>>>>>> is used to build the url. The cxf feature does not set the host no
>>>>>>>>>>>
>>>>>>>>>>> matter
>>>>>>>>>>
>>>>>>>>>
>>>>>>>> what I do or change.
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> I ended up hammering an ugly solution by setting a custom
>>>>>>>>>>> swagger2
>>>>>>>>>>> serializer
>>>>>>>>>>>
>>>>>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>>>>>
>>>>>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>>>>>
>>>>>>>>>>> host:port
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>> I'm I missing something here or this is indeed a problema at least
>>>>>>>>>>>
>>>>>>>>>>> with
>>>>>>>>>>
>>>>>>>>>
>>>>>>> the
>>>>>>>>
>>>>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>>>>>>>>>>>
>>>>>>>>>>> does
>>>>>>>>>>
>>>>>>>>>
>>>>>>> no
>>>>>>>>
>>>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>>>>>
>>>>>>>>>>> Tnks,
>>>>>>>>>>> Ivo Leitão
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p57798
>>>>>>>>>>> 47.html
>>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>> Sergey Beryozkin
>>>>>>>>>
>>>>>>>>> Talend Community Coders
>>>>>>>>> http://coders.talend.com/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>> Nino Martinez
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> --
>>>>>>> Christian Schneider
>>>>>>> http://www.liquid-reality.de
>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>> 2bd062c5a7e
>>>>>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>>>>>
>>>>>>> Open Source Architect
>>>>>>> http://www.talend.com
>>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>>> 2bd062c5a7e
>>>>>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>>
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Sergey Beryozkin <sb...@gmail.com>.
It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release

Sergey
On 21/06/17 14:37, nino martinez wael wrote:
> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
> swagger cxf module.. would that be a problme?
> 
> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
> 
>> SwaggerUIVersion ends up being null. It goes through all the checks.. Do I
>> need to declare that version somewhere?
>>
>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>>> Yes I will try so.. ASAP..
>>>
>>> -Thanks
>>>
>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <sb...@gmail.com>
>>> wrote:
>>>
>>>> Hi
>>>>
>>>> Can you put a breakpoint here:
>>>>
>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>> waggerUiResolver.java#L38
>>>>
>>>> Cheers, Sergey
>>>>
>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>
>>>>> I think I need both..
>>>>>
>>>>> Problem are that I run into the CORS problem since we have begun to host
>>>>> our DOSGI service on another port, and the only way to get SWAGGER ui to
>>>>> function correctly would be to host it alongside the webservice..
>>>>>
>>>>> Did you try with an older release of swagger..? I just dont know what I
>>>>> need to add for CXF to activate swager ui, I've put in
>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
>>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>>> But
>>>>> nothing shows up at my version of "http://host:port/context/services/
>>>>> api-docs?/url=/swagger.json"..
>>>>>
>>>>>
>>>>> Place I've looked:
>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>> chris@die-schneider.net> wrote:
>>>>>
>>>>> I worked on a better swagger integration a while ago but also failed at
>>>>>> the
>>>>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>>>>> support with the new swagger versions.
>>>>>> There are some interesting enhancements in the current DOSGi master so
>>>>>> we
>>>>>> could do a release soon.
>>>>>> It would be great to also include swagger support but I would also not
>>>>>> mind
>>>>>> to move swagger support to 2.3.0.
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>>> nino.martinez.wael@gmail.com>
>>>>>> :
>>>>>>
>>>>>> Hi Christian,
>>>>>>>
>>>>>>> I seem to remember that I can get the SWAGGER UI bundled together with
>>>>>>>
>>>>>> the
>>>>>>
>>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>>
>>>>>> api-docs
>>>>>>
>>>>>>> to my resource url. But it isnt working.
>>>>>>>
>>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>>> swagger
>>>>>>> ui document.
>>>>>>>
>>>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>>>> sberyozkin@gmail.com
>>>>>>>
>>>>>>> wrote:
>>>>>>>
>>>>>>> According to
>>>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>>>
>>>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>>>
>>>>>>>> Thanks, Sergey
>>>>>>>>
>>>>>>>>
>>>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>>>
>>>>>>>> I also had this problem but was not able to pin it down to the
>>>>>>>>> missing
>>>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>>>
>>>>>>>>> Can you post your code for the CustomSwagger2Serializers. If you wat
>>>>>>>>>
>>>>>>>> you
>>>>>>
>>>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>>>
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>>>>
>>>>>>>>> Hi sorry to resurrect this thread but I've a similar problem which
>>>>>>>>> was
>>>>>>>>>
>>>>>>>> not
>>>>>>>
>>>>>>>> completely solved with this approach,
>>>>>>>>>>
>>>>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>>>>
>>>>>>>>>>                   setScan(false);
>>>>>>>>>>                   setUsePathBasedConfig(true);
>>>>>>>>>>
>>>>>>>>>> in the swagger feature. It all works well except the "Try it out"
>>>>>>>>>> of
>>>>>>>>>>
>>>>>>>>> the
>>>>>>>
>>>>>>>> swagger ui. I'm using the latest version
>>>>>>>>>>
>>>>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>>>>
>>>>>>> 0.5)
>>>>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>>>>
>>>>>>>>> This
>>>>>>
>>>>>>> host
>>>>>>>>>> is used to build the url. The cxf feature does not set the host no
>>>>>>>>>>
>>>>>>>>> matter
>>>>>>>
>>>>>>>> what I do or change.
>>>>>>>>>>
>>>>>>>>>> I ended up hammering an ugly solution by setting a custom swagger2
>>>>>>>>>> serializer
>>>>>>>>>>
>>>>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>>>>
>>>>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>>>>
>>>>>>>>> host:port
>>>>>>>
>>>>>>>>
>>>>>>>>>> I'm I missing something here or this is indeed a problema at least
>>>>>>>>>>
>>>>>>>>> with
>>>>>>
>>>>>>> the
>>>>>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>>>>>>>>>>
>>>>>>>>> does
>>>>>>
>>>>>>> no
>>>>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>>>>
>>>>>>>>>> Tnks,
>>>>>>>>>> Ivo Leitão
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p57798
>>>>>>>>>> 47.html
>>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --
>>>>>>>> Sergey Beryozkin
>>>>>>>>
>>>>>>>> Talend Community Coders
>>>>>>>> http://coders.talend.com/
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best regards / Med venlig hilsen
>>>>>>> Nino Martinez
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> --
>>>>>> Christian Schneider
>>>>>> http://www.liquid-reality.de
>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>> 2bd062c5a7e
>>>>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>>>>
>>>>>> Open Source Architect
>>>>>> http://www.talend.com
>>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>>> 2bd062c5a7e
>>>>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
> 
> 
> 


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
swagger cxf module.. would that be a problme?

On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> SwaggerUIVersion ends up being null. It goes through all the checks.. Do I
> need to declare that version somewhere?
>
> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
>
>> Yes I will try so.. ASAP..
>>
>> -Thanks
>>
>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <sb...@gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> Can you put a breakpoint here:
>>>
>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>> waggerUiResolver.java#L38
>>>
>>> Cheers, Sergey
>>>
>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>
>>>> I think I need both..
>>>>
>>>> Problem are that I run into the CORS problem since we have begun to host
>>>> our DOSGI service on another port, and the only way to get SWAGGER ui to
>>>> function correctly would be to host it alongside the webservice..
>>>>
>>>> Did you try with an older release of swagger..? I just dont know what I
>>>> need to add for CXF to activate swager ui, I've put in
>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>> But
>>>> nothing shows up at my version of "http://host:port/context/services/
>>>> api-docs?/url=/swagger.json"..
>>>>
>>>>
>>>> Place I've looked:
>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>
>>>>
>>>>
>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>> chris@die-schneider.net> wrote:
>>>>
>>>> I worked on a better swagger integration a while ago but also failed at
>>>>> the
>>>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>>>> support with the new swagger versions.
>>>>> There are some interesting enhancements in the current DOSGi master so
>>>>> we
>>>>> could do a release soon.
>>>>> It would be great to also include swagger support but I would also not
>>>>> mind
>>>>> to move swagger support to 2.3.0.
>>>>>
>>>>> Christian
>>>>>
>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>> nino.martinez.wael@gmail.com>
>>>>> :
>>>>>
>>>>> Hi Christian,
>>>>>>
>>>>>> I seem to remember that I can get the SWAGGER UI bundled together with
>>>>>>
>>>>> the
>>>>>
>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>
>>>>> api-docs
>>>>>
>>>>>> to my resource url. But it isnt working.
>>>>>>
>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>> swagger
>>>>>> ui document.
>>>>>>
>>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>>
>>>>>>
>>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>>> sberyozkin@gmail.com
>>>>>>
>>>>>> wrote:
>>>>>>
>>>>>> According to
>>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>>
>>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>>
>>>>>>> Thanks, Sergey
>>>>>>>
>>>>>>>
>>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>>
>>>>>>> I also had this problem but was not able to pin it down to the
>>>>>>>> missing
>>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>>
>>>>>>>> Can you post your code for the CustomSwagger2Serializers. If you wat
>>>>>>>>
>>>>>>> you
>>>>>
>>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>>>
>>>>>>>> Hi sorry to resurrect this thread but I've a similar problem which
>>>>>>>> was
>>>>>>>>
>>>>>>> not
>>>>>>
>>>>>>> completely solved with this approach,
>>>>>>>>>
>>>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>>>
>>>>>>>>>                  setScan(false);
>>>>>>>>>                  setUsePathBasedConfig(true);
>>>>>>>>>
>>>>>>>>> in the swagger feature. It all works well except the "Try it out"
>>>>>>>>> of
>>>>>>>>>
>>>>>>>> the
>>>>>>
>>>>>>> swagger ui. I'm using the latest version
>>>>>>>>>
>>>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>>>
>>>>>> 0.5)
>>>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>>>
>>>>>>>> This
>>>>>
>>>>>> host
>>>>>>>>> is used to build the url. The cxf feature does not set the host no
>>>>>>>>>
>>>>>>>> matter
>>>>>>
>>>>>>> what I do or change.
>>>>>>>>>
>>>>>>>>> I ended up hammering an ugly solution by setting a custom swagger2
>>>>>>>>> serializer
>>>>>>>>>
>>>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>>>
>>>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>>>
>>>>>>>> host:port
>>>>>>
>>>>>>>
>>>>>>>>> I'm I missing something here or this is indeed a problema at least
>>>>>>>>>
>>>>>>>> with
>>>>>
>>>>>> the
>>>>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>>>>>>>>>
>>>>>>>> does
>>>>>
>>>>>> no
>>>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>>>
>>>>>>>>> Tnks,
>>>>>>>>> Ivo Leitão
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p57798
>>>>>>>>> 47.html
>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> Sergey Beryozkin
>>>>>>>
>>>>>>> Talend Community Coders
>>>>>>> http://coders.talend.com/
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards / Med venlig hilsen
>>>>>> Nino Martinez
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Christian Schneider
>>>>> http://www.liquid-reality.de
>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>> 2bd062c5a7e
>>>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>>>
>>>>> Open Source Architect
>>>>> http://www.talend.com
>>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>>>>> 2bd062c5a7e
>>>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
SwaggerUIVersion ends up being null. It goes through all the checks.. Do I
need to declare that version somewhere?

On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> Yes I will try so.. ASAP..
>
> -Thanks
>
> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
>
>> Hi
>>
>> Can you put a breakpoint here:
>>
>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>> waggerUiResolver.java#L38
>>
>> Cheers, Sergey
>>
>> On 16/06/17 07:13, nino martinez wael wrote:
>>
>>> I think I need both..
>>>
>>> Problem are that I run into the CORS problem since we have begun to host
>>> our DOSGI service on another port, and the only way to get SWAGGER ui to
>>> function correctly would be to host it alongside the webservice..
>>>
>>> Did you try with an older release of swagger..? I just dont know what I
>>> need to add for CXF to activate swager ui, I've put in
>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
>>> activation as far as I can see, combined with supportSwaggerUi=true.. But
>>> nothing shows up at my version of "http://host:port/context/services/
>>> api-docs?/url=/swagger.json"..
>>>
>>>
>>> Place I've looked:
>>> http://cxf.apache.org/docs/swagger2feature.html
>>>
>>>
>>>
>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>> chris@die-schneider.net> wrote:
>>>
>>> I worked on a better swagger integration a while ago but also failed at
>>>> the
>>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>>> support with the new swagger versions.
>>>> There are some interesting enhancements in the current DOSGi master so
>>>> we
>>>> could do a release soon.
>>>> It would be great to also include swagger support but I would also not
>>>> mind
>>>> to move swagger support to 2.3.0.
>>>>
>>>> Christian
>>>>
>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>> nino.martinez.wael@gmail.com>
>>>> :
>>>>
>>>> Hi Christian,
>>>>>
>>>>> I seem to remember that I can get the SWAGGER UI bundled together with
>>>>>
>>>> the
>>>>
>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>
>>>> api-docs
>>>>
>>>>> to my resource url. But it isnt working.
>>>>>
>>>>> My swagger.json are generated correctly..But does not link to the
>>>>> swagger
>>>>> ui document.
>>>>>
>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>
>>>>>
>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>> sberyozkin@gmail.com
>>>>>
>>>>> wrote:
>>>>>
>>>>> According to
>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>
>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>
>>>>>> Thanks, Sergey
>>>>>>
>>>>>>
>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>
>>>>>> I also had this problem but was not able to pin it down to the missing
>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>
>>>>>>> Can you post your code for the CustomSwagger2Serializers. If you wat
>>>>>>>
>>>>>> you
>>>>
>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>>
>>>>>>> Hi sorry to resurrect this thread but I've a similar problem which
>>>>>>> was
>>>>>>>
>>>>>> not
>>>>>
>>>>>> completely solved with this approach,
>>>>>>>>
>>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>>
>>>>>>>>                  setScan(false);
>>>>>>>>                  setUsePathBasedConfig(true);
>>>>>>>>
>>>>>>>> in the swagger feature. It all works well except the "Try it out" of
>>>>>>>>
>>>>>>> the
>>>>>
>>>>>> swagger ui. I'm using the latest version
>>>>>>>>
>>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>>
>>>>> 0.5)
>>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>>
>>>>>>> This
>>>>
>>>>> host
>>>>>>>> is used to build the url. The cxf feature does not set the host no
>>>>>>>>
>>>>>>> matter
>>>>>
>>>>>> what I do or change.
>>>>>>>>
>>>>>>>> I ended up hammering an ugly solution by setting a custom swagger2
>>>>>>>> serializer
>>>>>>>>
>>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>>
>>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>>
>>>>>>> host:port
>>>>>
>>>>>>
>>>>>>>> I'm I missing something here or this is indeed a problema at least
>>>>>>>>
>>>>>>> with
>>>>
>>>>> the
>>>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>>>>>>>>
>>>>>>> does
>>>>
>>>>> no
>>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>>
>>>>>>>> Tnks,
>>>>>>>> Ivo Leitão
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Sergey Beryozkin
>>>>>>
>>>>>> Talend Community Coders
>>>>>> http://coders.talend.com/
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
>>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>>
>>>> Open Source Architect
>>>> http://www.talend.com
>>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
>>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>>
>>>>
>>>
>>>
>>>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
Yes I will try so.. ASAP..

-Thanks

On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> Hi
>
> Can you put a breakpoint here:
>
> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
> OsgiSwaggerUiResolver.java#L38
>
> Cheers, Sergey
>
> On 16/06/17 07:13, nino martinez wael wrote:
>
>> I think I need both..
>>
>> Problem are that I run into the CORS problem since we have begun to host
>> our DOSGI service on another port, and the only way to get SWAGGER ui to
>> function correctly would be to host it alongside the webservice..
>>
>> Did you try with an older release of swagger..? I just dont know what I
>> need to add for CXF to activate swager ui, I've put in
>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
>> activation as far as I can see, combined with supportSwaggerUi=true.. But
>> nothing shows up at my version of "http://host:port/context/services/
>> api-docs?/url=/swagger.json"..
>>
>>
>> Place I've looked:
>> http://cxf.apache.org/docs/swagger2feature.html
>>
>>
>>
>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>> chris@die-schneider.net> wrote:
>>
>> I worked on a better swagger integration a while ago but also failed at
>>> the
>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>> support with the new swagger versions.
>>> There are some interesting enhancements in the current DOSGi master so we
>>> could do a release soon.
>>> It would be great to also include swagger support but I would also not
>>> mind
>>> to move swagger support to 2.3.0.
>>>
>>> Christian
>>>
>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>> nino.martinez.wael@gmail.com>
>>> :
>>>
>>> Hi Christian,
>>>>
>>>> I seem to remember that I can get the SWAGGER UI bundled together with
>>>>
>>> the
>>>
>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>
>>> api-docs
>>>
>>>> to my resource url. But it isnt working.
>>>>
>>>> My swagger.json are generated correctly..But does not link to the
>>>> swagger
>>>> ui document.
>>>>
>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>
>>>>
>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>> sberyozkin@gmail.com
>>>>
>>>> wrote:
>>>>
>>>> According to
>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>
>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>> keep working with Swagger 2 UI for the moment
>>>>>
>>>>> Thanks, Sergey
>>>>>
>>>>>
>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>
>>>>> I also had this problem but was not able to pin it down to the missing
>>>>>> host. ( I am not very familiar with swagger).
>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>
>>>>>> Can you post your code for the CustomSwagger2Serializers. If you wat
>>>>>>
>>>>> you
>>>
>>>> can also create a PR in cxf to fix the issue.
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>>
>>>>>> Hi sorry to resurrect this thread but I've a similar problem which was
>>>>>>
>>>>> not
>>>>
>>>>> completely solved with this approach,
>>>>>>>
>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>
>>>>>>>                  setScan(false);
>>>>>>>                  setUsePathBasedConfig(true);
>>>>>>>
>>>>>>> in the swagger feature. It all works well except the "Try it out" of
>>>>>>>
>>>>>> the
>>>>
>>>>> swagger ui. I'm using the latest version
>>>>>>>
>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>
>>>> 0.5)
>>>>>>> and I've noticed that in the swagger.json the host is not filled.
>>>>>>>
>>>>>> This
>>>
>>>> host
>>>>>>> is used to build the url. The cxf feature does not set the host no
>>>>>>>
>>>>>> matter
>>>>
>>>>> what I do or change.
>>>>>>>
>>>>>>> I ended up hammering an ugly solution by setting a custom swagger2
>>>>>>> serializer
>>>>>>>
>>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>>
>>>>>>> where I'm able to extract the servlet request thus setting the
>>>>>>>
>>>>>> host:port
>>>>
>>>>>
>>>>>>> I'm I missing something here or this is indeed a problema at least
>>>>>>>
>>>>>> with
>>>
>>>> the
>>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>>>>>>>
>>>>>> does
>>>
>>>> no
>>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>>
>>>>>>> Tnks,
>>>>>>> Ivo Leitão
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Sergey Beryozkin
>>>>>
>>>>> Talend Community Coders
>>>>> http://coders.talend.com/
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
>>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>>
>>> Open Source Architect
>>> http://www.talend.com
>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
>>> 46&URL=http%3a%2f%2fwww.talend.com>
>>>
>>>
>>
>>
>>


-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

Can you put a breakpoint here:

https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java#L38

Cheers, Sergey
On 16/06/17 07:13, nino martinez wael wrote:
> I think I need both..
> 
> Problem are that I run into the CORS problem since we have begun to host
> our DOSGI service on another port, and the only way to get SWAGGER ui to
> function correctly would be to host it alongside the webservice..
> 
> Did you try with an older release of swagger..? I just dont know what I
> need to add for CXF to activate swager ui, I've put in
> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
> activation as far as I can see, combined with supportSwaggerUi=true.. But
> nothing shows up at my version of "http://host:port/context/services/
> api-docs?/url=/swagger.json"..
> 
> 
> Place I've looked:
> http://cxf.apache.org/docs/swagger2feature.html
> 
> 
> 
> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
> chris@die-schneider.net> wrote:
> 
>> I worked on a better swagger integration a while ago but also failed at the
>> UI. At that time I think it was an incompatibility of the cxf swagger
>> support with the new swagger versions.
>> There are some interesting enhancements in the current DOSGi master so we
>> could do a release soon.
>> It would be great to also include swagger support but I would also not mind
>> to move swagger support to 2.3.0.
>>
>> Christian
>>
>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>> nino.martinez.wael@gmail.com>
>> :
>>
>>> Hi Christian,
>>>
>>> I seem to remember that I can get the SWAGGER UI bundled together with
>> the
>>> DOSGI app. But cannot remember the url I have tried with appending
>> api-docs
>>> to my resource url. But it isnt working.
>>>
>>> My swagger.json are generated correctly..But does not link to the swagger
>>> ui document.
>>>
>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>
>>>
>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <sberyozkin@gmail.com
>>>
>>> wrote:
>>>
>>>> According to
>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>
>>>> it is a SwaggerUI 3 refactoring related issue...
>>>> keep working with Swagger 2 UI for the moment
>>>>
>>>> Thanks, Sergey
>>>>
>>>>
>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>
>>>>> I also had this problem but was not able to pin it down to the missing
>>>>> host. ( I am not very familiar with swagger).
>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>
>>>>> Can you post your code for the CustomSwagger2Serializers. If you wat
>> you
>>>>> can also create a PR in cxf to fix the issue.
>>>>>
>>>>> Christian
>>>>>
>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>>>>
>>>>> Hi sorry to resurrect this thread but I've a similar problem which was
>>> not
>>>>>> completely solved with this approach,
>>>>>>
>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>
>>>>>>                  setScan(false);
>>>>>>                  setUsePathBasedConfig(true);
>>>>>>
>>>>>> in the swagger feature. It all works well except the "Try it out" of
>>> the
>>>>>> swagger ui. I'm using the latest version
>> (mvn:org.webjars/swagger-ui/3.
>>>>>> 0.5)
>>>>>> and I've noticed that in the swagger.json the host is not filled.
>> This
>>>>>> host
>>>>>> is used to build the url. The cxf feature does not set the host no
>>> matter
>>>>>> what I do or change.
>>>>>>
>>>>>> I ended up hammering an ugly solution by setting a custom swagger2
>>>>>> serializer
>>>>>>
>>>>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>>>>
>>>>>> where I'm able to extract the servlet request thus setting the
>>> host:port
>>>>>>
>>>>>> I'm I missing something here or this is indeed a problema at least
>> with
>>>>>> the
>>>>>> latest swagger ui version (It seems odd also that the swagger 2 ui
>> does
>>>>>> no
>>>>>> use by default the current url but it didn't work in my tests) ?
>>>>>>
>>>>>> Tnks,
>>>>>> Ivo Leitão
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context: http://cxf.547215.n5.nabble.
>>>>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>
>>
>>
>> --
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
>> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>
>> Open Source Architect
>> http://www.talend.com
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
>> 46&URL=http%3a%2f%2fwww.talend.com>
>>
> 
> 
> 

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
I think I need both..

Problem are that I run into the CORS problem since we have begun to host
our DOSGI service on another port, and the only way to get SWAGGER ui to
function correctly would be to host it alongside the webservice..

Did you try with an older release of swagger..? I just dont know what I
need to add for CXF to activate swager ui, I've put in
wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
activation as far as I can see, combined with supportSwaggerUi=true.. But
nothing shows up at my version of "http://host:port/context/services/
api-docs?/url=/swagger.json"..


Place I've looked:
http://cxf.apache.org/docs/swagger2feature.html



On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
chris@die-schneider.net> wrote:

> I worked on a better swagger integration a while ago but also failed at the
> UI. At that time I think it was an incompatibility of the cxf swagger
> support with the new swagger versions.
> There are some interesting enhancements in the current DOSGi master so we
> could do a release soon.
> It would be great to also include swagger support but I would also not mind
> to move swagger support to 2.3.0.
>
> Christian
>
> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
> nino.martinez.wael@gmail.com>
> :
>
> > Hi Christian,
> >
> > I seem to remember that I can get the SWAGGER UI bundled together with
> the
> > DOSGI app. But cannot remember the url I have tried with appending
> api-docs
> > to my resource url. But it isnt working.
> >
> > My swagger.json are generated correctly..But does not link to the swagger
> > ui document.
> >
> > BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
> >
> >
> > On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <sberyozkin@gmail.com
> >
> > wrote:
> >
> > > According to
> > > https://issues.apache.org/jira/browse/CXF-7347
> > >
> > > it is a SwaggerUI 3 refactoring related issue...
> > > keep working with Swagger 2 UI for the moment
> > >
> > > Thanks, Sergey
> > >
> > >
> > > On 24/04/17 05:52, Christian Schneider wrote:
> > >
> > >> I also had this problem but was not able to pin it down to the missing
> > >> host. ( I am not very familiar with swagger).
> > >> Based on your findings I hope e can find a good solution to this.
> > >>
> > >> Can you post your code for the CustomSwagger2Serializers. If you wat
> you
> > >> can also create a PR in cxf to fix the issue.
> > >>
> > >> Christian
> > >>
> > >> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
> > >>
> > >> Hi sorry to resurrect this thread but I've a similar problem which was
> > not
> > >>> completely solved with this approach,
> > >>>
> > >>> First I've managed to make dosgi work with swagger with a:
> > >>>
> > >>>                 setScan(false);
> > >>>                 setUsePathBasedConfig(true);
> > >>>
> > >>> in the swagger feature. It all works well except the "Try it out" of
> > the
> > >>> swagger ui. I'm using the latest version
> (mvn:org.webjars/swagger-ui/3.
> > >>> 0.5)
> > >>> and I've noticed that in the swagger.json the host is not filled.
> This
> > >>> host
> > >>> is used to build the url. The cxf feature does not set the host no
> > matter
> > >>> what I do or change.
> > >>>
> > >>> I ended up hammering an ugly solution by setting a custom swagger2
> > >>> serializer
> > >>>
> > >>> setSwagger2Serializers(new CustomSwagger2Serializers());
> > >>>
> > >>> where I'm able to extract the servlet request thus setting the
> > host:port
> > >>>
> > >>> I'm I missing something here or this is indeed a problema at least
> with
> > >>> the
> > >>> latest swagger ui version (It seems odd also that the swagger 2 ui
> does
> > >>> no
> > >>> use by default the current url but it didn't work in my tests) ?
> > >>>
> > >>> Tnks,
> > >>> Ivo Leitão
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> View this message in context: http://cxf.547215.n5.nabble.
> > >>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
> > >>> Sent from the cxf-user mailing list archive at Nabble.com.
> > >>>
> > >>>
> > >>
> > >>
> > >>
> > >
> > > --
> > > Sergey Beryozkin
> > >
> > > Talend Community Coders
> > > http://coders.talend.com/
> > >
> >
> >
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
> 46&URL=http%3a%2f%2fwww.liquid-reality.de>
>
> Open Source Architect
> http://www.talend.com
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
> 46&URL=http%3a%2f%2fwww.talend.com>
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Christian Schneider <ch...@die-schneider.net>.
I worked on a better swagger integration a while ago but also failed at the
UI. At that time I think it was an incompatibility of the cxf swagger
support with the new swagger versions.
There are some interesting enhancements in the current DOSGi master so we
could do a release soon.
It would be great to also include swagger support but I would also not mind
to move swagger support to 2.3.0.

Christian

2017-06-14 14:58 GMT+02:00 nino martinez wael <ni...@gmail.com>
:

> Hi Christian,
>
> I seem to remember that I can get the SWAGGER UI bundled together with the
> DOSGI app. But cannot remember the url I have tried with appending api-docs
> to my resource url. But it isnt working.
>
> My swagger.json are generated correctly..But does not link to the swagger
> ui document.
>
> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>
>
> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
>
> > According to
> > https://issues.apache.org/jira/browse/CXF-7347
> >
> > it is a SwaggerUI 3 refactoring related issue...
> > keep working with Swagger 2 UI for the moment
> >
> > Thanks, Sergey
> >
> >
> > On 24/04/17 05:52, Christian Schneider wrote:
> >
> >> I also had this problem but was not able to pin it down to the missing
> >> host. ( I am not very familiar with swagger).
> >> Based on your findings I hope e can find a good solution to this.
> >>
> >> Can you post your code for the CustomSwagger2Serializers. If you wat you
> >> can also create a PR in cxf to fix the issue.
> >>
> >> Christian
> >>
> >> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
> >>
> >> Hi sorry to resurrect this thread but I've a similar problem which was
> not
> >>> completely solved with this approach,
> >>>
> >>> First I've managed to make dosgi work with swagger with a:
> >>>
> >>>                 setScan(false);
> >>>                 setUsePathBasedConfig(true);
> >>>
> >>> in the swagger feature. It all works well except the "Try it out" of
> the
> >>> swagger ui. I'm using the latest version (mvn:org.webjars/swagger-ui/3.
> >>> 0.5)
> >>> and I've noticed that in the swagger.json the host is not filled. This
> >>> host
> >>> is used to build the url. The cxf feature does not set the host no
> matter
> >>> what I do or change.
> >>>
> >>> I ended up hammering an ugly solution by setting a custom swagger2
> >>> serializer
> >>>
> >>> setSwagger2Serializers(new CustomSwagger2Serializers());
> >>>
> >>> where I'm able to extract the servlet request thus setting the
> host:port
> >>>
> >>> I'm I missing something here or this is indeed a problema at least with
> >>> the
> >>> latest swagger ui version (It seems odd also that the swagger 2 ui does
> >>> no
> >>> use by default the current url but it didn't work in my tests) ?
> >>>
> >>> Tnks,
> >>> Ivo Leitão
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context: http://cxf.547215.n5.nabble.
> >>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
> >>> Sent from the cxf-user mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >>
> >
> > --
> > Sergey Beryozkin
> >
> > Talend Community Coders
> > http://coders.talend.com/
> >
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
Hi Christian,

I seem to remember that I can get the SWAGGER UI bundled together with the
DOSGI app. But cannot remember the url I have tried with appending api-docs
to my resource url. But it isnt working.

My swagger.json are generated correctly..But does not link to the swagger
ui document.

BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?


On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> According to
> https://issues.apache.org/jira/browse/CXF-7347
>
> it is a SwaggerUI 3 refactoring related issue...
> keep working with Swagger 2 UI for the moment
>
> Thanks, Sergey
>
>
> On 24/04/17 05:52, Christian Schneider wrote:
>
>> I also had this problem but was not able to pin it down to the missing
>> host. ( I am not very familiar with swagger).
>> Based on your findings I hope e can find a good solution to this.
>>
>> Can you post your code for the CustomSwagger2Serializers. If you wat you
>> can also create a PR in cxf to fix the issue.
>>
>> Christian
>>
>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:
>>
>> Hi sorry to resurrect this thread but I've a similar problem which was not
>>> completely solved with this approach,
>>>
>>> First I've managed to make dosgi work with swagger with a:
>>>
>>>                 setScan(false);
>>>                 setUsePathBasedConfig(true);
>>>
>>> in the swagger feature. It all works well except the "Try it out" of the
>>> swagger ui. I'm using the latest version (mvn:org.webjars/swagger-ui/3.
>>> 0.5)
>>> and I've noticed that in the swagger.json the host is not filled. This
>>> host
>>> is used to build the url. The cxf feature does not set the host no matter
>>> what I do or change.
>>>
>>> I ended up hammering an ugly solution by setting a custom swagger2
>>> serializer
>>>
>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>
>>> where I'm able to extract the servlet request thus setting the host:port
>>>
>>> I'm I missing something here or this is indeed a problema at least with
>>> the
>>> latest swagger ui version (It seems odd also that the swagger 2 ui does
>>> no
>>> use by default the current url but it didn't work in my tests) ?
>>>
>>> Tnks,
>>> Ivo Leitão
>>>
>>>
>>>
>>> --
>>> View this message in context: http://cxf.547215.n5.nabble.
>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Sergey Beryozkin <sb...@gmail.com>.
According to
https://issues.apache.org/jira/browse/CXF-7347

it is a SwaggerUI 3 refactoring related issue...
keep working with Swagger 2 UI for the moment

Thanks, Sergey

On 24/04/17 05:52, Christian Schneider wrote:
> I also had this problem but was not able to pin it down to the missing
> host. ( I am not very familiar with swagger).
> Based on your findings I hope e can find a good solution to this.
>
> Can you post your code for the CustomSwagger2Serializers. If you wat you
> can also create a PR in cxf to fix the issue.
>
> Christian
>
> 2017-04-23 23:49 GMT+02:00 Ivo Leit�o <iv...@gmail.com>:
>
>> Hi sorry to resurrect this thread but I've a similar problem which was not
>> completely solved with this approach,
>>
>> First I've managed to make dosgi work with swagger with a:
>>
>>                 setScan(false);
>>                 setUsePathBasedConfig(true);
>>
>> in the swagger feature. It all works well except the "Try it out" of the
>> swagger ui. I'm using the latest version (mvn:org.webjars/swagger-ui/3.
>> 0.5)
>> and I've noticed that in the swagger.json the host is not filled. This host
>> is used to build the url. The cxf feature does not set the host no matter
>> what I do or change.
>>
>> I ended up hammering an ugly solution by setting a custom swagger2
>> serializer
>>
>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>
>> where I'm able to extract the servlet request thus setting the host:port
>>
>> I'm I missing something here or this is indeed a problema at least with the
>> latest swagger ui version (It seems odd also that the swagger 2 ui does no
>> use by default the current url but it didn't work in my tests) ?
>>
>> Tnks,
>> Ivo Leit�o
>>
>>
>>
>> --
>> View this message in context: http://cxf.547215.n5.nabble.
>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: DOSGI 2 prefered documentation technique?

Posted by Christian Schneider <ch...@die-schneider.net>.
I also had this problem but was not able to pin it down to the missing
host. ( I am not very familiar with swagger).
Based on your findings I hope e can find a good solution to this.

Can you post your code for the CustomSwagger2Serializers. If you wat you
can also create a PR in cxf to fix the issue.

Christian

2017-04-23 23:49 GMT+02:00 Ivo Leitão <iv...@gmail.com>:

> Hi sorry to resurrect this thread but I've a similar problem which was not
> completely solved with this approach,
>
> First I've managed to make dosgi work with swagger with a:
>
>                 setScan(false);
>                 setUsePathBasedConfig(true);
>
> in the swagger feature. It all works well except the "Try it out" of the
> swagger ui. I'm using the latest version (mvn:org.webjars/swagger-ui/3.
> 0.5)
> and I've noticed that in the swagger.json the host is not filled. This host
> is used to build the url. The cxf feature does not set the host no matter
> what I do or change.
>
> I ended up hammering an ugly solution by setting a custom swagger2
> serializer
>
> setSwagger2Serializers(new CustomSwagger2Serializers());
>
> where I'm able to extract the servlet request thus setting the host:port
>
> I'm I missing something here or this is indeed a problema at least with the
> latest swagger ui version (It seems odd also that the swagger 2 ui does no
> use by default the current url but it didn't work in my tests) ?
>
> Tnks,
> Ivo Leitão
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.
> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>

RE: DOSGI 2 prefered documentation technique?

Posted by Ivo Leitão <iv...@gmail.com>.
Hi sorry to resurrect this thread but I've a similar problem which was not
completely solved with this approach,

First I've managed to make dosgi work with swagger with a:

		setScan(false);
		setUsePathBasedConfig(true);

in the swagger feature. It all works well except the "Try it out" of the
swagger ui. I'm using the latest version (mvn:org.webjars/swagger-ui/3.0.5)
and I've noticed that in the swagger.json the host is not filled. This host
is used to build the url. The cxf feature does not set the host no matter
what I do or change.

I ended up hammering an ugly solution by setting a custom swagger2
serializer

setSwagger2Serializers(new CustomSwagger2Serializers());

where I'm able to extract the servlet request thus setting the host:port

I'm I missing something here or this is indeed a problema at least with the
latest swagger ui version (It seems odd also that the swagger 2 ui does no
use by default the current url but it didn't work in my tests) ?

Tnks,
Ivo Leitão



--
View this message in context: http://cxf.547215.n5.nabble.com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
meanwhile I am pursuing to distribute my enunciate doc instead.. Using
httpservice..


On Fri, Apr 7, 2017 at 7:53 AM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> Christian, I have cloned dosgi, and added swagger to the jackson example
>
> https://github.com/nmwael/cxf-dosgi
> https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest/impl-jackson
>
>
> On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
>
>> I know disabling a scan did help some of my colleagues to make it work
>> OSGI...
>>
>> Sergey
>>
>> On 06/04/17 15:44, Sergey Beryozkin wrote:
>>
>>> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
>>> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
>>> Swagger2featire does in that demo, and I guess then compare to what is
>>> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>>>
>>> Cheers, Sergey
>>> On 06/04/17 15:05, nino martinez wael wrote:
>>>
>>>> I will look into making a test project.
>>>>
>>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>>>> nino.martinez.wael@gmail.com> wrote:
>>>>
>>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>>>> swagger are not complaining, I have manually referred to the package
>>>>> for it
>>>>> to look.
>>>>>
>>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>
>>>>> Let me just check.. I think I am using the wrong version of swagger..I
>>>>>> did a manual feature, for karaf... this feature should be used :
>>>>>> cxf-rs-description-swagger2
>>>>>>
>>>>>> Let me just verify..
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <
>>>>>> sberyozkin@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> Yes, sometimes setScan(false) helps
>>>>>>>
>>>>>>> Sergey
>>>>>>>
>>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>>>
>>>>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>>>>>> works like this in OSGi?
>>>>>>>>
>>>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>>>> willing to
>>>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>>>> would be
>>>>>>>> a great feature for remote services.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>>>>
>>>>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>>>>>> aware of
>>>>>>>>> my endpoint.. However I have swagger ui running (although since
>>>>>>>>> swagger
>>>>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>>>>
>>>>>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>>>>>> does
>>>>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>>>>
>>>>>>>>> @Component //
>>>>>>>>>          (
>>>>>>>>>                  property =
>>>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>>>>> //
>>>>>>>>>          )
>>>>>>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>>>>>>
>>>>>>>>>      private String version = "";
>>>>>>>>>      private String name = "";
>>>>>>>>>
>>>>>>>>>      @Activate
>>>>>>>>>      public void activate(BundleContext bundleContext) {
>>>>>>>>>          Dictionary<String, String> headers =
>>>>>>>>> bundleContext.getBundle().getHeaders();
>>>>>>>>>          version = headers.get("Bundle-Version");
>>>>>>>>>          name = headers.get("Bundle-Name");
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>      }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>      @Override
>>>>>>>>>      public List<Object> call() throws Exception {
>>>>>>>>>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>>>>>>>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>>>>>          swagger2Feature.setTitle(name);
>>>>>>>>>          swagger2Feature.setDescription(name);
>>>>>>>>>          swagger2Feature.setLicense("Commercial");
>>>>>>>>>          swagger2Feature.setSupportSwaggerUi(true);
>>>>>>>>>          swagger2Feature.setContact("development@");
>>>>>>>>>          swagger2Feature.setScan(true);
>>>>>>>>>          swagger2Feature.setScanAllResources(true);
>>>>>>>>>          swagger2Feature.setUsePathBasedConfig(true);
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>          swagger2Feature.setPrettyPrint(true);
>>>>>>>>>          swagger2Feature.setVersion(version);
>>>>>>>>>
>>>>>>>>>          return Arrays.asList((swagger2Feature));
>>>>>>>>>      }
>>>>>>>>>
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks for the mention about logger interceptors.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>>>>>> <chris@die-schneider.net
>>>>>>>>>
>>>>>>>>> wrote:
>>>>>>>>>> How do you export the swagger intent?
>>>>>>>>>>
>>>>>>>>>> Btw. The interceptors property will not work but you can add the
>>>>>>>>>> logging
>>>>>>>>>> Feature to the swagger intent service.
>>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>>>>>>
>>>>>>>>>> Im having issue getting swagger to pickup my jaxrs endpoints...
>>>>>>>>>> CXF
>>>>>>>>>>
>>>>>>>>>>> picks
>>>>>>>>>>> them up..
>>>>>>>>>>>
>>>>>>>>>>> here a short sample:
>>>>>>>>>>>
>>>>>>>>>>> @Path("/")
>>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>>>>>>           property
>>>>>>>>>>>                   = //
>>>>>>>>>>>                   { //
>>>>>>>>>>>                           "service.exported.intents=swagger",
>>>>>>>>>>>                           "service.exported.interfaces=*",
>>>>>>>>>>>                           "service.exported.configs=org.
>>>>>>>>>>> apache.cxf.rs",
>>>>>>>>>>>                           "org.apache.cxf.rs.address=/di
>>>>>>>>>>> aler/v1/",
>>>>>>>>>>>
>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>>> r.LoggingInInterceptor",
>>>>>>>>>>>
>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>>> r.LoggingOutInterceptor"
>>>>>>>>>>>                   })
>>>>>>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>>>>>>
>>>>>>>>>>>       private BusinessService businessService;
>>>>>>>>>>>       private static org.slf4j.Logger logger =
>>>>>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>>>>>>
>>>>>>>>>>>       /**
>>>>>>>>>>>        * @return Gives a full list of campaigns in the system
>>>>>>>>>>>        */
>>>>>>>>>>>       @Path("/fullcampaigns")
>>>>>>>>>>>       @GET
>>>>>>>>>>>       @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>>       @Override
>>>>>>>>>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>>>>>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>>>>>>           return businessService.getFullCampaigns();
>>>>>>>>>>>       }
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>> I will test it now..
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> The Swagger integration provides a feature. So adding this
>>>>>>>>>>>> should be
>>>>>>>>>>>>
>>>>>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>>>>>>
>>>>>>>>>>>>> You create an intent service like this:
>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>>>>>>
>>>>>>>>>>>>> and add it to the service:
>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>>>>>>
>>>>>>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I also thought about supporting the @Features annotation on
>>>>>>>>>>>>> DOSGi
>>>>>>>>>>>>> service  to provide a simple way to add features that do not
>>>>>>>>>>>>> need
>>>>>>>>>>>>> additional config.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Christian
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Guys
>>>>>>>>>>>>>
>>>>>>>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>>>>>>>>> down the
>>>>>>>>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>>>>>>>>> okay I've
>>>>>>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>>>>>>> wondering if
>>>>>>>>>>>>>> its
>>>>>>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Christian Schneider
>>>>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>>>>
>>>>>>>>>>>>> Open Source Architect
>>>>>>>>>>>>> http://www.talend.com
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>>
>>>>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>>>>> Nino Martinez
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>> Christian Schneider
>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>
>>>>>>>>>> Open Source Architect
>>>>>>>>>> http://www.talend.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> Sergey Beryozkin
>>>>>>>
>>>>>>> Talend Community Coders
>>>>>>> http://coders.talend.com/
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards / Med venlig hilsen
>>>>>> Nino Martinez
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

RE: DOSGI 2 prefered documentation technique?

Posted by Andrei Shakirin <as...@talend.com>.
Hi,

There is an option to package Swagger UI stuff into separate servlet and deploy it into Karaf.
I could provide an example, if needed.

Alternatively Swagger UI can be hosted on other Web Server, but initialized JSON / YAML URL from Karaf service.

Regards,
Andrei.

> -----Original Message-----
> From: nino martinez wael [mailto:nino.martinez.wael@gmail.com]
> Sent: Sonntag, 9. April 2017 10:04
> To: users@cxf.apache.org
> Subject: Re: DOSGI 2 prefered documentation technique?
> 
> Ok great news. I have the enunciate version Working, with http service..
> 
> On 7 Apr 2017 18:07, "Christian Schneider" <ch...@die-schneider.net> wrote:
> 
> > It was not yet fully working like this. I got a swagger json but
> > without any methods defined.
> >
> > With the help of sergey I found that I need to set @Api on the
> > TaskResource interface.
> > Then I get some better json.
> >
> > I am still not able to use the UI to call the methods but I hope I can
> > also work this out.
> >
> > Christian
> >
> > On 07.04.2017 11:55, Christian Schneider wrote:
> >
> >> I think I got it working by changing the swagger feature to:
> >>
> >>         Swagger2Feature swagger2Feature = new Swagger2Feature();
> >>         swagger2Feature.setBasePath("/cxf/tasks/");
> >>         swagger2Feature.setUsePathBasedConfig(true);
> >>         return Arrays.asList((Object)swagger2Feature);
> >>
> >> Basically I used the same config as in the
> >> jax_rs_description_swagger2_osgi example.
> >> Can you check if this works for you too?
> >>
> >> Christian
> >>
> >> On 07.04.2017 07:53, nino martinez wael wrote:
> >>
> >>> Christian, I have cloned dosgi, and added swagger to the jackson
> >>> example
> >>>
> >>> https://github.com/nmwael/cxf-dosgi
> >>> https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest
> >>> /impl-jackson
> >>>
> >>>
> >>> On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin
> >>> <sb...@gmail.com>
> >>> wrote:
> >>>
> >>> I know disabling a scan did help some of my colleagues to make it
> >>> work
> >>>> OSGI...
> >>>>
> >>>> Sergey
> >>>>
> >>>> On 06/04/17 15:44, Sergey Beryozkin wrote:
> >>>>
> >>>> Hi, to be honest, I do not know if it is expected to work with
> >>>> DOSGi2,
> >>>>> have a look please at the 'plain' Swagger2 OSGI demo, and debug
> >>>>> what Swagger2featire does in that demo, and I guess then compare
> >>>>> to what is happening with DOSGI, I think it needs to be at least
> >>>>> CXF 3.1.10
> >>>>>
> >>>>> Cheers, Sergey
> >>>>> On 06/04/17 15:05, nino martinez wael wrote:
> >>>>>
> >>>>> I will look into making a test project.
> >>>>>>
> >>>>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
> >>>>>> nino.martinez.wael@gmail.com> wrote:
> >>>>>>
> >>>>>> Nope did not fix it.. setScan(false) did not help.. And wondering
> >>>>>> why
> >>>>>>
> >>>>>>> swagger are not complaining, I have manually referred to the
> >>>>>>> package for it to look.
> >>>>>>>
> >>>>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
> >>>>>>> nino.martinez.wael@gmail.com> wrote:
> >>>>>>>
> >>>>>>> Let me just check.. I think I am using the wrong version of
> >>>>>>> swagger..I
> >>>>>>>
> >>>>>>>> did a manual feature, for karaf... this feature should be used :
> >>>>>>>> cxf-rs-description-swagger2
> >>>>>>>>
> >>>>>>>> Let me just verify..
> >>>>>>>>
> >>>>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <
> >>>>>>>> sberyozkin@gmail.com
> >>>>>>>> wrote:
> >>>>>>>>
> >>>>>>>> Yes, sometimes setScan(false) helps
> >>>>>>>>
> >>>>>>>>> Sergey
> >>>>>>>>>
> >>>>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
> >>>>>>>>>
> >>>>>>>>> I am not very familiar with how Swagger works. Are you sure
> >>>>>>>>> the scan
> >>>>>>>>>
> >>>>>>>>>> works like this in OSGi?
> >>>>>>>>>>
> >>>>>>>>>> Can you maybe put your test project into a github repo ? I am
> >>>>>>>>>> willing to invest a bit of time to help make this work as I
> >>>>>>>>>> think swagger would be a great feature for remote services.
> >>>>>>>>>>
> >>>>>>>>>> Christian
> >>>>>>>>>>
> >>>>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
> >>>>>>>>>>
> >>>>>>>>>> I've fiddled a lot, nothing seems to work in order to make
> >>>>>>>>>> swagger
> >>>>>>>>>>
> >>>>>>>>>>> aware of
> >>>>>>>>>>> my endpoint.. However I have swagger ui running (although
> >>>>>>>>>>> since swagger cannot see my endpoints, it's somewhat
> >>>>>>>>>>> empty)...
> >>>>>>>>>>>
> >>>>>>>>>>> RSA does pickup the swagger intent, and all are "working"
> >>>>>>>>>>> except it does not see my endpoints. I get both swagger json
> >>>>>>>>>>> and yaml.
> >>>>>>>>>>>
> >>>>>>>>>>> @Component //
> >>>>>>>>>>>           (
> >>>>>>>>>>>                   property =
> >>>>>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
> >>>>>>>>>>> //
> >>>>>>>>>>>           )
> >>>>>>>>>>> public class SwaggerIntent implements Callable<List<Object>>
> >>>>>>>>>>> {
> >>>>>>>>>>>
> >>>>>>>>>>>       private String version = "";
> >>>>>>>>>>>       private String name = "";
> >>>>>>>>>>>
> >>>>>>>>>>>       @Activate
> >>>>>>>>>>>       public void activate(BundleContext bundleContext) {
> >>>>>>>>>>>           Dictionary<String, String> headers =
> >>>>>>>>>>> bundleContext.getBundle().getHeaders();
> >>>>>>>>>>>           version = headers.get("Bundle-Version");
> >>>>>>>>>>>           name = headers.get("Bundle-Name");
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>       }
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>       @Override
> >>>>>>>>>>>       public List<Object> call() throws Exception {
> >>>>>>>>>>>           Swagger2Feature swagger2Feature = new
> >>>>>>>>>>> Swagger2Feature();
> >>>>>>>>>>> swagger2Feature.setBasePath("/cxf/dialer/v1/");
> >>>>>>>>>>>           swagger2Feature.setTitle(name);
> >>>>>>>>>>>           swagger2Feature.setDescription(name);
> >>>>>>>>>>> swagger2Feature.setLicense("Commercial");
> >>>>>>>>>>> swagger2Feature.setSupportSwaggerUi(true);
> >>>>>>>>>>> swagger2Feature.setContact("development@");
> >>>>>>>>>>>           swagger2Feature.setScan(true);
> >>>>>>>>>>> swagger2Feature.setScanAllResources(true);
> >>>>>>>>>>> swagger2Feature.setUsePathBasedConfig(true);
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>           swagger2Feature.setPrettyPrint(true);
> >>>>>>>>>>>           swagger2Feature.setVersion(version);
> >>>>>>>>>>>
> >>>>>>>>>>>           return Arrays.asList((swagger2Feature));
> >>>>>>>>>>>       }
> >>>>>>>>>>>
> >>>>>>>>>>> }
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> Thanks for the mention about logger interceptors.
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
> >>>>>>>>>>> <chris@die-schneider.net
> >>>>>>>>>>>
> >>>>>>>>>>> wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>> How do you export the swagger intent?
> >>>>>>>>>>>>
> >>>>>>>>>>>> Btw. The interceptors property will not work but you can
> >>>>>>>>>>>> add the logging Feature to the swagger intent service.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Christian
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>> Im having issue getting swagger to pickup my jaxrs endpoints...
> >>>>>>>>>>>> CXF
> >>>>>>>>>>>>
> >>>>>>>>>>>> picks
> >>>>>>>>>>>>> them up..
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> here a short sample:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> @Path("/")
> >>>>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
> >>>>>>>>>>>>> MediaType.APPLICATION_XML}) @Component(immediate =
> true,
> >>>>>>>>>>>>> name = "SimpleEndPointsImpl", //
> >>>>>>>>>>>>>            property
> >>>>>>>>>>>>>                    = //
> >>>>>>>>>>>>>                    { //
> >>>>>>>>>>>>> "service.exported.intents=swagger",
> >>>>>>>>>>>>> "service.exported.interfaces=*",
> >>>>>>>>>>>>> "service.exported.configs=org.
> >>>>>>>>>>>>> apache.cxf.rs",
> >>>>>>>>>>>>> "org.apache.cxf.rs.address=/di aler/v1/",
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercep
> >>>>>>>>>>>>> to
> >>>>>>>>>>>>> r.LoggingInInterceptor",
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercep
> >>>>>>>>>>>>> to
> >>>>>>>>>>>>> r.LoggingOutInterceptor"
> >>>>>>>>>>>>>                    })
> >>>>>>>>>>>>> public class SimpleEndPointsImpl implements
> >>>>>>>>>>>>> SimpleEndPoints {
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>        private BusinessService businessService;
> >>>>>>>>>>>>>        private static org.slf4j.Logger logger =
> >>>>>>>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>        /**
> >>>>>>>>>>>>>         * @return Gives a full list of campaigns in the system
> >>>>>>>>>>>>>         */
> >>>>>>>>>>>>>        @Path("/fullcampaigns")
> >>>>>>>>>>>>>        @GET
> >>>>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
> >>>>>>>>>>>>> MediaType.APPLICATION_XML})
> >>>>>>>>>>>>>        @Override
> >>>>>>>>>>>>>        public List<FullCampaign> getAllCampaignsStatus()
> >>>>>>>>>>>>> throws CiscoAPIException, FailedSecurityException {
> >>>>>>>>>>>>>            return businessService.getFullCampaigns();
> >>>>>>>>>>>>>        }
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
> >>>>>>>>>>>>> nino.martinez.wael@gmail.com> wrote:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> I will test it now..
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
> >>>>>>>>>>>>>> chris@die-schneider.net> wrote:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> The Swagger integration provides a feature. So adding
> >>>>>>>>>>>>>> this should be
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> quite similar to adding the Jackson provider.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> You create an intent service like this:
> >>>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/
> >>>>>>>>>>>>>>> rest
> >>>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples
> >>>>>>>>>>>>>>> /res t/impl/JacksonIntent.java
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> and add it to the service:
> >>>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/
> >>>>>>>>>>>>>>> rest
> >>>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples
> >>>>>>>>>>>>>>> /res
> >>>>>>>>>>>>>>> t/impl/TaskResourceImpl.java#L36
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> Can you test this and give Feedback if it works.
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> I also thought about supporting the @Features annotation
> >>>>>>>>>>>>>>> on DOSGi service  to provide a simple way to add
> >>>>>>>>>>>>>>> features that do not need additional config.
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> Christian
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> Hi Guys
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> I've been contemplating on documentation. Currently
> >>>>>>>>>>>>>>> we've gone
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> down the
> >>>>>>>>>>>>>>>> offline documentation road, using enunciate[1] while it
> >>>>>>>>>>>>>>>> feels okay I've seen that CXF supports other directions
> >>>>>>>>>>>>>>>> natively[2]. I am wondering if its possible to use
> >>>>>>>>>>>>>>>> those with DOSGI?
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> [1]http://enunciate.webcohesion.com/
> >>>>>>>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> --
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> Christian Schneider
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> http://www.liquid-reality.de
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> Open Source Architect
> >>>>>>>>>>>>>>> http://www.talend.com
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> --
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> Best regards / Med venlig hilsen
> >>>>>>>>>>>>>> Nino Martinez
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> --
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> Christian Schneider
> >>>>>>>>>>>> http://www.liquid-reality.de
> >>>>>>>>>>>>
> >>>>>>>>>>>> Open Source Architect
> >>>>>>>>>>>> http://www.talend.com
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>> Sergey Beryozkin
> >>>>>>>>>
> >>>>>>>>> Talend Community Coders
> >>>>>>>>> http://coders.talend.com/
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>> --
> >>>>>>>> Best regards / Med venlig hilsen Nino Martinez
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> --
> >>>>>>> Best regards / Med venlig hilsen
> >>>>>>> Nino Martinez
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>> --
> >>>> Sergey Beryozkin
> >>>>
> >>>> Talend Community Coders
> >>>> http://coders.talend.com/
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >
> > --
> > Christian Schneider
> > http://www.liquid-reality.de
> >
> > Open Source Architect
> > http://www.talend.com
> >
> >

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
Ok great news. I have the enunciate version Working, with http service..

On 7 Apr 2017 18:07, "Christian Schneider" <ch...@die-schneider.net> wrote:

> It was not yet fully working like this. I got a swagger json but without
> any methods defined.
>
> With the help of sergey I found that I need to set @Api on the
> TaskResource interface.
> Then I get some better json.
>
> I am still not able to use the UI to call the methods but I hope I can
> also work this out.
>
> Christian
>
> On 07.04.2017 11:55, Christian Schneider wrote:
>
>> I think I got it working by changing the swagger feature to:
>>
>>         Swagger2Feature swagger2Feature = new Swagger2Feature();
>>         swagger2Feature.setBasePath("/cxf/tasks/");
>>         swagger2Feature.setUsePathBasedConfig(true);
>>         return Arrays.asList((Object)swagger2Feature);
>>
>> Basically I used the same config as in the jax_rs_description_swagger2_osgi
>> example.
>> Can you check if this works for you too?
>>
>> Christian
>>
>> On 07.04.2017 07:53, nino martinez wael wrote:
>>
>>> Christian, I have cloned dosgi, and added swagger to the jackson example
>>>
>>> https://github.com/nmwael/cxf-dosgi
>>> https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest
>>> /impl-jackson
>>>
>>>
>>> On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin <sb...@gmail.com>
>>> wrote:
>>>
>>> I know disabling a scan did help some of my colleagues to make it work
>>>> OSGI...
>>>>
>>>> Sergey
>>>>
>>>> On 06/04/17 15:44, Sergey Beryozkin wrote:
>>>>
>>>> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
>>>>> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
>>>>> Swagger2featire does in that demo, and I guess then compare to what is
>>>>> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>>>>>
>>>>> Cheers, Sergey
>>>>> On 06/04/17 15:05, nino martinez wael wrote:
>>>>>
>>>>> I will look into making a test project.
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>
>>>>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>>>>>
>>>>>>> swagger are not complaining, I have manually referred to the package
>>>>>>> for it
>>>>>>> to look.
>>>>>>>
>>>>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>
>>>>>>> Let me just check.. I think I am using the wrong version of
>>>>>>> swagger..I
>>>>>>>
>>>>>>>> did a manual feature, for karaf... this feature should be used :
>>>>>>>> cxf-rs-description-swagger2
>>>>>>>>
>>>>>>>> Let me just verify..
>>>>>>>>
>>>>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <
>>>>>>>> sberyozkin@gmail.com
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Yes, sometimes setScan(false) helps
>>>>>>>>
>>>>>>>>> Sergey
>>>>>>>>>
>>>>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>>>>>
>>>>>>>>> I am not very familiar with how Swagger works. Are you sure the
>>>>>>>>> scan
>>>>>>>>>
>>>>>>>>>> works like this in OSGi?
>>>>>>>>>>
>>>>>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>>>>>> willing to
>>>>>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>>>>>> would be
>>>>>>>>>> a great feature for remote services.
>>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>>>>>>
>>>>>>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>>>>>>>
>>>>>>>>>>> aware of
>>>>>>>>>>> my endpoint.. However I have swagger ui running (although since
>>>>>>>>>>> swagger
>>>>>>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>>>>>>
>>>>>>>>>>> RSA does pickup the swagger intent, and all are "working" except
>>>>>>>>>>> it
>>>>>>>>>>> does
>>>>>>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>>>>>>
>>>>>>>>>>> @Component //
>>>>>>>>>>>           (
>>>>>>>>>>>                   property =
>>>>>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>>>>>>> //
>>>>>>>>>>>           )
>>>>>>>>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>>>>>>>>
>>>>>>>>>>>       private String version = "";
>>>>>>>>>>>       private String name = "";
>>>>>>>>>>>
>>>>>>>>>>>       @Activate
>>>>>>>>>>>       public void activate(BundleContext bundleContext) {
>>>>>>>>>>>           Dictionary<String, String> headers =
>>>>>>>>>>> bundleContext.getBundle().getHeaders();
>>>>>>>>>>>           version = headers.get("Bundle-Version");
>>>>>>>>>>>           name = headers.get("Bundle-Name");
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>       }
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>       @Override
>>>>>>>>>>>       public List<Object> call() throws Exception {
>>>>>>>>>>>           Swagger2Feature swagger2Feature = new
>>>>>>>>>>> Swagger2Feature();
>>>>>>>>>>> swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>>>>>>>           swagger2Feature.setTitle(name);
>>>>>>>>>>>           swagger2Feature.setDescription(name);
>>>>>>>>>>> swagger2Feature.setLicense("Commercial");
>>>>>>>>>>> swagger2Feature.setSupportSwaggerUi(true);
>>>>>>>>>>> swagger2Feature.setContact("development@");
>>>>>>>>>>>           swagger2Feature.setScan(true);
>>>>>>>>>>> swagger2Feature.setScanAllResources(true);
>>>>>>>>>>> swagger2Feature.setUsePathBasedConfig(true);
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>           swagger2Feature.setPrettyPrint(true);
>>>>>>>>>>>           swagger2Feature.setVersion(version);
>>>>>>>>>>>
>>>>>>>>>>>           return Arrays.asList((swagger2Feature));
>>>>>>>>>>>       }
>>>>>>>>>>>
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Thanks for the mention about logger interceptors.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>>>>>>>> <chris@die-schneider.net
>>>>>>>>>>>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> How do you export the swagger intent?
>>>>>>>>>>>>
>>>>>>>>>>>> Btw. The interceptors property will not work but you can add the
>>>>>>>>>>>> logging
>>>>>>>>>>>> Feature to the swagger intent service.
>>>>>>>>>>>>
>>>>>>>>>>>> Christian
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Im having issue getting swagger to pickup my jaxrs endpoints...
>>>>>>>>>>>> CXF
>>>>>>>>>>>>
>>>>>>>>>>>> picks
>>>>>>>>>>>>> them up..
>>>>>>>>>>>>>
>>>>>>>>>>>>> here a short sample:
>>>>>>>>>>>>>
>>>>>>>>>>>>> @Path("/")
>>>>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>>>>>>>>            property
>>>>>>>>>>>>>                    = //
>>>>>>>>>>>>>                    { //
>>>>>>>>>>>>> "service.exported.intents=swagger",
>>>>>>>>>>>>> "service.exported.interfaces=*",
>>>>>>>>>>>>> "service.exported.configs=org.
>>>>>>>>>>>>> apache.cxf.rs",
>>>>>>>>>>>>> "org.apache.cxf.rs.address=/di
>>>>>>>>>>>>> aler/v1/",
>>>>>>>>>>>>>
>>>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>>>>> r.LoggingInInterceptor",
>>>>>>>>>>>>>
>>>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>>>>> r.LoggingOutInterceptor"
>>>>>>>>>>>>>                    })
>>>>>>>>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>>>>>>>>
>>>>>>>>>>>>>        private BusinessService businessService;
>>>>>>>>>>>>>        private static org.slf4j.Logger logger =
>>>>>>>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>>>>>>>>
>>>>>>>>>>>>>        /**
>>>>>>>>>>>>>         * @return Gives a full list of campaigns in the system
>>>>>>>>>>>>>         */
>>>>>>>>>>>>>        @Path("/fullcampaigns")
>>>>>>>>>>>>>        @GET
>>>>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>>>>        @Override
>>>>>>>>>>>>>        public List<FullCampaign> getAllCampaignsStatus() throws
>>>>>>>>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>>>>>>>>            return businessService.getFullCampaigns();
>>>>>>>>>>>>>        }
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>>>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I will test it now..
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> The Swagger integration provides a feature. So adding this
>>>>>>>>>>>>>> should be
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> You create an intent service like this:
>>>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> and add it to the service:
>>>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I also thought about supporting the @Features annotation on
>>>>>>>>>>>>>>> DOSGi
>>>>>>>>>>>>>>> service  to provide a simple way to add features that do not
>>>>>>>>>>>>>>> need
>>>>>>>>>>>>>>> additional config.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Christian
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi Guys
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I've been contemplating on documentation. Currently we've
>>>>>>>>>>>>>>> gone
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> down the
>>>>>>>>>>>>>>>> offline documentation road, using enunciate[1] while it
>>>>>>>>>>>>>>>> feels
>>>>>>>>>>>>>>>> okay I've
>>>>>>>>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>>>>>>>>> wondering if
>>>>>>>>>>>>>>>> its
>>>>>>>>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Christian Schneider
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Open Source Architect
>>>>>>>>>>>>>>> http://www.talend.com
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>>>>>>> Nino Martinez
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>
>>>>>>>>>>>>> Christian Schneider
>>>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>>>
>>>>>>>>>>>> Open Source Architect
>>>>>>>>>>>> http://www.talend.com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>> Sergey Beryozkin
>>>>>>>>>
>>>>>>>>> Talend Community Coders
>>>>>>>>> http://coders.talend.com/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --
>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>> Nino Martinez
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> Best regards / Med venlig hilsen
>>>>>>> Nino Martinez
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>>
>>>
>>>
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>

Re: DOSGI 2 prefered documentation technique?

Posted by Christian Schneider <ch...@die-schneider.net>.
It was not yet fully working like this. I got a swagger json but without 
any methods defined.

With the help of sergey I found that I need to set @Api on the 
TaskResource interface.
Then I get some better json.

I am still not able to use the UI to call the methods but I hope I can 
also work this out.

Christian

On 07.04.2017 11:55, Christian Schneider wrote:
> I think I got it working by changing the swagger feature to:
>
>         Swagger2Feature swagger2Feature = new Swagger2Feature();
>         swagger2Feature.setBasePath("/cxf/tasks/");
>         swagger2Feature.setUsePathBasedConfig(true);
>         return Arrays.asList((Object)swagger2Feature);
>
> Basically I used the same config as in the 
> jax_rs_description_swagger2_osgi example.
> Can you check if this works for you too?
>
> Christian
>
> On 07.04.2017 07:53, nino martinez wael wrote:
>> Christian, I have cloned dosgi, and added swagger to the jackson example
>>
>> https://github.com/nmwael/cxf-dosgi
>> https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest/impl-jackson 
>>
>>
>>
>> On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin <sb...@gmail.com>
>> wrote:
>>
>>> I know disabling a scan did help some of my colleagues to make it work
>>> OSGI...
>>>
>>> Sergey
>>>
>>> On 06/04/17 15:44, Sergey Beryozkin wrote:
>>>
>>>> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
>>>> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
>>>> Swagger2featire does in that demo, and I guess then compare to what is
>>>> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>>>>
>>>> Cheers, Sergey
>>>> On 06/04/17 15:05, nino martinez wael wrote:
>>>>
>>>>> I will look into making a test project.
>>>>>
>>>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>
>>>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>>>>> swagger are not complaining, I have manually referred to the package
>>>>>> for it
>>>>>> to look.
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>
>>>>>> Let me just check.. I think I am using the wrong version of 
>>>>>> swagger..I
>>>>>>> did a manual feature, for karaf... this feature should be used :
>>>>>>> cxf-rs-description-swagger2
>>>>>>>
>>>>>>> Let me just verify..
>>>>>>>
>>>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin 
>>>>>>> <sberyozkin@gmail.com
>>>>>>> wrote:
>>>>>>>
>>>>>>> Yes, sometimes setScan(false) helps
>>>>>>>> Sergey
>>>>>>>>
>>>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>>>>
>>>>>>>> I am not very familiar with how Swagger works. Are you sure the 
>>>>>>>> scan
>>>>>>>>> works like this in OSGi?
>>>>>>>>>
>>>>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>>>>> willing to
>>>>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>>>>> would be
>>>>>>>>> a great feature for remote services.
>>>>>>>>>
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>>>>>
>>>>>>>>> I've fiddled a lot, nothing seems to work in order to make 
>>>>>>>>> swagger
>>>>>>>>>> aware of
>>>>>>>>>> my endpoint.. However I have swagger ui running (although since
>>>>>>>>>> swagger
>>>>>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>>>>>
>>>>>>>>>> RSA does pickup the swagger intent, and all are "working" 
>>>>>>>>>> except it
>>>>>>>>>> does
>>>>>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>>>>>
>>>>>>>>>> @Component //
>>>>>>>>>>           (
>>>>>>>>>>                   property =
>>>>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>>>>>> //
>>>>>>>>>>           )
>>>>>>>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>>>>>>>
>>>>>>>>>>       private String version = "";
>>>>>>>>>>       private String name = "";
>>>>>>>>>>
>>>>>>>>>>       @Activate
>>>>>>>>>>       public void activate(BundleContext bundleContext) {
>>>>>>>>>>           Dictionary<String, String> headers =
>>>>>>>>>> bundleContext.getBundle().getHeaders();
>>>>>>>>>>           version = headers.get("Bundle-Version");
>>>>>>>>>>           name = headers.get("Bundle-Name");
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>       }
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>       @Override
>>>>>>>>>>       public List<Object> call() throws Exception {
>>>>>>>>>>           Swagger2Feature swagger2Feature = new 
>>>>>>>>>> Swagger2Feature();
>>>>>>>>>> swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>>>>>>           swagger2Feature.setTitle(name);
>>>>>>>>>>           swagger2Feature.setDescription(name);
>>>>>>>>>> swagger2Feature.setLicense("Commercial");
>>>>>>>>>> swagger2Feature.setSupportSwaggerUi(true);
>>>>>>>>>> swagger2Feature.setContact("development@");
>>>>>>>>>>           swagger2Feature.setScan(true);
>>>>>>>>>> swagger2Feature.setScanAllResources(true);
>>>>>>>>>> swagger2Feature.setUsePathBasedConfig(true);
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>           swagger2Feature.setPrettyPrint(true);
>>>>>>>>>>           swagger2Feature.setVersion(version);
>>>>>>>>>>
>>>>>>>>>>           return Arrays.asList((swagger2Feature));
>>>>>>>>>>       }
>>>>>>>>>>
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks for the mention about logger interceptors.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>>>>>>> <chris@die-schneider.net
>>>>>>>>>>
>>>>>>>>>> wrote:
>>>>>>>>>>> How do you export the swagger intent?
>>>>>>>>>>>
>>>>>>>>>>> Btw. The interceptors property will not work but you can add 
>>>>>>>>>>> the
>>>>>>>>>>> logging
>>>>>>>>>>> Feature to the swagger intent service.
>>>>>>>>>>>
>>>>>>>>>>> Christian
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>>>>>>>
>>>>>>>>>>> Im having issue getting swagger to pickup my jaxrs 
>>>>>>>>>>> endpoints... CXF
>>>>>>>>>>>
>>>>>>>>>>>> picks
>>>>>>>>>>>> them up..
>>>>>>>>>>>>
>>>>>>>>>>>> here a short sample:
>>>>>>>>>>>>
>>>>>>>>>>>> @Path("/")
>>>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>>>>>>>            property
>>>>>>>>>>>>                    = //
>>>>>>>>>>>>                    { //
>>>>>>>>>>>> "service.exported.intents=swagger",
>>>>>>>>>>>> "service.exported.interfaces=*",
>>>>>>>>>>>> "service.exported.configs=org.
>>>>>>>>>>>> apache.cxf.rs",
>>>>>>>>>>>> "org.apache.cxf.rs.address=/di
>>>>>>>>>>>> aler/v1/",
>>>>>>>>>>>>
>>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>>>> r.LoggingInInterceptor",
>>>>>>>>>>>>
>>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>>>> r.LoggingOutInterceptor"
>>>>>>>>>>>>                    })
>>>>>>>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>>>>>>>
>>>>>>>>>>>>        private BusinessService businessService;
>>>>>>>>>>>>        private static org.slf4j.Logger logger =
>>>>>>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>>>>>>>
>>>>>>>>>>>>        /**
>>>>>>>>>>>>         * @return Gives a full list of campaigns in the system
>>>>>>>>>>>>         */
>>>>>>>>>>>>        @Path("/fullcampaigns")
>>>>>>>>>>>>        @GET
>>>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>>>        @Override
>>>>>>>>>>>>        public List<FullCampaign> getAllCampaignsStatus() 
>>>>>>>>>>>> throws
>>>>>>>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>>>>>>>            return businessService.getFullCampaigns();
>>>>>>>>>>>>        }
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> I will test it now..
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> The Swagger integration provides a feature. So adding this
>>>>>>>>>>>>> should be
>>>>>>>>>>>>>
>>>>>>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>>>>>>> You create an intent service like this:
>>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> and add it to the service:
>>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I also thought about supporting the @Features annotation on
>>>>>>>>>>>>>> DOSGi
>>>>>>>>>>>>>> service  to provide a simple way to add features that do not
>>>>>>>>>>>>>> need
>>>>>>>>>>>>>> additional config.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Christian
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi Guys
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I've been contemplating on documentation. Currently we've 
>>>>>>>>>>>>>> gone
>>>>>>>>>>>>>>> down the
>>>>>>>>>>>>>>> offline documentation road, using enunciate[1] while it 
>>>>>>>>>>>>>>> feels
>>>>>>>>>>>>>>> okay I've
>>>>>>>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>>>>>>>> wondering if
>>>>>>>>>>>>>>> its
>>>>>>>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Christian Schneider
>>>>>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Open Source Architect
>>>>>>>>>>>>>> http://www.talend.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>
>>>>>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>>>>>> Nino Martinez
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> -- 
>>>>>>>>>>> Christian Schneider
>>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>>
>>>>>>>>>>> Open Source Architect
>>>>>>>>>>> http://www.talend.com
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Sergey Beryozkin
>>>>>>>>
>>>>>>>> Talend Community Coders
>>>>>>>> http://coders.talend.com/
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> Best regards / Med venlig hilsen
>>>>>>> Nino Martinez
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Best regards / Med venlig hilsen
>>>>>> Nino Martinez
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>> -- 
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>>>
>>
>>
>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: DOSGI 2 prefered documentation technique?

Posted by Christian Schneider <ch...@die-schneider.net>.
I think I got it working by changing the swagger feature to:

         Swagger2Feature swagger2Feature = new Swagger2Feature();
         swagger2Feature.setBasePath("/cxf/tasks/");
         swagger2Feature.setUsePathBasedConfig(true);
         return Arrays.asList((Object)swagger2Feature);

Basically I used the same config as in the 
jax_rs_description_swagger2_osgi example.
Can you check if this works for you too?

Christian

On 07.04.2017 07:53, nino martinez wael wrote:
> Christian, I have cloned dosgi, and added swagger to the jackson example
>
> https://github.com/nmwael/cxf-dosgi
> https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest/impl-jackson
>
>
> On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
>
>> I know disabling a scan did help some of my colleagues to make it work
>> OSGI...
>>
>> Sergey
>>
>> On 06/04/17 15:44, Sergey Beryozkin wrote:
>>
>>> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
>>> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
>>> Swagger2featire does in that demo, and I guess then compare to what is
>>> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>>>
>>> Cheers, Sergey
>>> On 06/04/17 15:05, nino martinez wael wrote:
>>>
>>>> I will look into making a test project.
>>>>
>>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>>>> nino.martinez.wael@gmail.com> wrote:
>>>>
>>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>>>> swagger are not complaining, I have manually referred to the package
>>>>> for it
>>>>> to look.
>>>>>
>>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>
>>>>> Let me just check.. I think I am using the wrong version of swagger..I
>>>>>> did a manual feature, for karaf... this feature should be used :
>>>>>> cxf-rs-description-swagger2
>>>>>>
>>>>>> Let me just verify..
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sberyozkin@gmail.com
>>>>>> wrote:
>>>>>>
>>>>>> Yes, sometimes setScan(false) helps
>>>>>>> Sergey
>>>>>>>
>>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>>>
>>>>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>>>>>> works like this in OSGi?
>>>>>>>>
>>>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>>>> willing to
>>>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>>>> would be
>>>>>>>> a great feature for remote services.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>>>>
>>>>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>>>>>> aware of
>>>>>>>>> my endpoint.. However I have swagger ui running (although since
>>>>>>>>> swagger
>>>>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>>>>
>>>>>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>>>>>> does
>>>>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>>>>
>>>>>>>>> @Component //
>>>>>>>>>           (
>>>>>>>>>                   property =
>>>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>>>>> //
>>>>>>>>>           )
>>>>>>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>>>>>>
>>>>>>>>>       private String version = "";
>>>>>>>>>       private String name = "";
>>>>>>>>>
>>>>>>>>>       @Activate
>>>>>>>>>       public void activate(BundleContext bundleContext) {
>>>>>>>>>           Dictionary<String, String> headers =
>>>>>>>>> bundleContext.getBundle().getHeaders();
>>>>>>>>>           version = headers.get("Bundle-Version");
>>>>>>>>>           name = headers.get("Bundle-Name");
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>       }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>       @Override
>>>>>>>>>       public List<Object> call() throws Exception {
>>>>>>>>>           Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>>>>>>>           swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>>>>>           swagger2Feature.setTitle(name);
>>>>>>>>>           swagger2Feature.setDescription(name);
>>>>>>>>>           swagger2Feature.setLicense("Commercial");
>>>>>>>>>           swagger2Feature.setSupportSwaggerUi(true);
>>>>>>>>>           swagger2Feature.setContact("development@");
>>>>>>>>>           swagger2Feature.setScan(true);
>>>>>>>>>           swagger2Feature.setScanAllResources(true);
>>>>>>>>>           swagger2Feature.setUsePathBasedConfig(true);
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>           swagger2Feature.setPrettyPrint(true);
>>>>>>>>>           swagger2Feature.setVersion(version);
>>>>>>>>>
>>>>>>>>>           return Arrays.asList((swagger2Feature));
>>>>>>>>>       }
>>>>>>>>>
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks for the mention about logger interceptors.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>>>>>> <chris@die-schneider.net
>>>>>>>>>
>>>>>>>>> wrote:
>>>>>>>>>> How do you export the swagger intent?
>>>>>>>>>>
>>>>>>>>>> Btw. The interceptors property will not work but you can add the
>>>>>>>>>> logging
>>>>>>>>>> Feature to the swagger intent service.
>>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>>>>>>
>>>>>>>>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF
>>>>>>>>>>
>>>>>>>>>>> picks
>>>>>>>>>>> them up..
>>>>>>>>>>>
>>>>>>>>>>> here a short sample:
>>>>>>>>>>>
>>>>>>>>>>> @Path("/")
>>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>>>>>>            property
>>>>>>>>>>>                    = //
>>>>>>>>>>>                    { //
>>>>>>>>>>>                            "service.exported.intents=swagger",
>>>>>>>>>>>                            "service.exported.interfaces=*",
>>>>>>>>>>>                            "service.exported.configs=org.
>>>>>>>>>>> apache.cxf.rs",
>>>>>>>>>>>                            "org.apache.cxf.rs.address=/di
>>>>>>>>>>> aler/v1/",
>>>>>>>>>>>
>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>>> r.LoggingInInterceptor",
>>>>>>>>>>>
>>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>>> r.LoggingOutInterceptor"
>>>>>>>>>>>                    })
>>>>>>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>>>>>>
>>>>>>>>>>>        private BusinessService businessService;
>>>>>>>>>>>        private static org.slf4j.Logger logger =
>>>>>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>>>>>>
>>>>>>>>>>>        /**
>>>>>>>>>>>         * @return Gives a full list of campaigns in the system
>>>>>>>>>>>         */
>>>>>>>>>>>        @Path("/fullcampaigns")
>>>>>>>>>>>        @GET
>>>>>>>>>>>        @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>>        @Override
>>>>>>>>>>>        public List<FullCampaign> getAllCampaignsStatus() throws
>>>>>>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>>>>>>            return businessService.getFullCampaigns();
>>>>>>>>>>>        }
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>> I will test it now..
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> The Swagger integration provides a feature. So adding this
>>>>>>>>>>>> should be
>>>>>>>>>>>>
>>>>>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>>>>>> You create an intent service like this:
>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>>>>>>
>>>>>>>>>>>>> and add it to the service:
>>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>>>>>>
>>>>>>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I also thought about supporting the @Features annotation on
>>>>>>>>>>>>> DOSGi
>>>>>>>>>>>>> service  to provide a simple way to add features that do not
>>>>>>>>>>>>> need
>>>>>>>>>>>>> additional config.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Christian
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Guys
>>>>>>>>>>>>>
>>>>>>>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>>>>>>>>> down the
>>>>>>>>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>>>>>>>>> okay I've
>>>>>>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>>>>>>> wondering if
>>>>>>>>>>>>>> its
>>>>>>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Christian Schneider
>>>>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>>>>
>>>>>>>>>>>>> Open Source Architect
>>>>>>>>>>>>> http://www.talend.com
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>>
>>>>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>>>>> Nino Martinez
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>> Christian Schneider
>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>
>>>>>>>>>> Open Source Architect
>>>>>>>>>> http://www.talend.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> Sergey Beryozkin
>>>>>>>
>>>>>>> Talend Community Coders
>>>>>>> http://coders.talend.com/
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards / Med venlig hilsen
>>>>>> Nino Martinez
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>>
>>>>
>>>>
>>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
Christian, I have cloned dosgi, and added swagger to the jackson example

https://github.com/nmwael/cxf-dosgi
https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest/impl-jackson


On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> I know disabling a scan did help some of my colleagues to make it work
> OSGI...
>
> Sergey
>
> On 06/04/17 15:44, Sergey Beryozkin wrote:
>
>> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
>> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
>> Swagger2featire does in that demo, and I guess then compare to what is
>> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>>
>> Cheers, Sergey
>> On 06/04/17 15:05, nino martinez wael wrote:
>>
>>> I will look into making a test project.
>>>
>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>>> nino.martinez.wael@gmail.com> wrote:
>>>
>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>>> swagger are not complaining, I have manually referred to the package
>>>> for it
>>>> to look.
>>>>
>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>>> nino.martinez.wael@gmail.com> wrote:
>>>>
>>>> Let me just check.. I think I am using the wrong version of swagger..I
>>>>> did a manual feature, for karaf... this feature should be used :
>>>>> cxf-rs-description-swagger2
>>>>>
>>>>> Let me just verify..
>>>>>
>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sberyozkin@gmail.com
>>>>> >
>>>>> wrote:
>>>>>
>>>>> Yes, sometimes setScan(false) helps
>>>>>>
>>>>>> Sergey
>>>>>>
>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>>
>>>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>>>>> works like this in OSGi?
>>>>>>>
>>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>>> willing to
>>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>>> would be
>>>>>>> a great feature for remote services.
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>>>
>>>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>>>>> aware of
>>>>>>>> my endpoint.. However I have swagger ui running (although since
>>>>>>>> swagger
>>>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>>>
>>>>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>>>>> does
>>>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>>>
>>>>>>>> @Component //
>>>>>>>>          (
>>>>>>>>                  property =
>>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>>>> //
>>>>>>>>          )
>>>>>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>>>>>
>>>>>>>>      private String version = "";
>>>>>>>>      private String name = "";
>>>>>>>>
>>>>>>>>      @Activate
>>>>>>>>      public void activate(BundleContext bundleContext) {
>>>>>>>>          Dictionary<String, String> headers =
>>>>>>>> bundleContext.getBundle().getHeaders();
>>>>>>>>          version = headers.get("Bundle-Version");
>>>>>>>>          name = headers.get("Bundle-Name");
>>>>>>>>
>>>>>>>>
>>>>>>>>      }
>>>>>>>>
>>>>>>>>
>>>>>>>>      @Override
>>>>>>>>      public List<Object> call() throws Exception {
>>>>>>>>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>>>>>>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>>>>          swagger2Feature.setTitle(name);
>>>>>>>>          swagger2Feature.setDescription(name);
>>>>>>>>          swagger2Feature.setLicense("Commercial");
>>>>>>>>          swagger2Feature.setSupportSwaggerUi(true);
>>>>>>>>          swagger2Feature.setContact("development@");
>>>>>>>>          swagger2Feature.setScan(true);
>>>>>>>>          swagger2Feature.setScanAllResources(true);
>>>>>>>>          swagger2Feature.setUsePathBasedConfig(true);
>>>>>>>>
>>>>>>>>
>>>>>>>>          swagger2Feature.setPrettyPrint(true);
>>>>>>>>          swagger2Feature.setVersion(version);
>>>>>>>>
>>>>>>>>          return Arrays.asList((swagger2Feature));
>>>>>>>>      }
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks for the mention about logger interceptors.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>>>>> <chris@die-schneider.net
>>>>>>>>
>>>>>>>> wrote:
>>>>>>>>> How do you export the swagger intent?
>>>>>>>>>
>>>>>>>>> Btw. The interceptors property will not work but you can add the
>>>>>>>>> logging
>>>>>>>>> Feature to the swagger intent service.
>>>>>>>>>
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>>>>>
>>>>>>>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF
>>>>>>>>>
>>>>>>>>>> picks
>>>>>>>>>> them up..
>>>>>>>>>>
>>>>>>>>>> here a short sample:
>>>>>>>>>>
>>>>>>>>>> @Path("/")
>>>>>>>>>> @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>>>>>           property
>>>>>>>>>>                   = //
>>>>>>>>>>                   { //
>>>>>>>>>>                           "service.exported.intents=swagger",
>>>>>>>>>>                           "service.exported.interfaces=*",
>>>>>>>>>>                           "service.exported.configs=org.
>>>>>>>>>> apache.cxf.rs",
>>>>>>>>>>                           "org.apache.cxf.rs.address=/di
>>>>>>>>>> aler/v1/",
>>>>>>>>>>
>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>> r.LoggingInInterceptor",
>>>>>>>>>>
>>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>>> r.LoggingOutInterceptor"
>>>>>>>>>>                   })
>>>>>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>>>>>
>>>>>>>>>>       private BusinessService businessService;
>>>>>>>>>>       private static org.slf4j.Logger logger =
>>>>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>>>>>
>>>>>>>>>>       /**
>>>>>>>>>>        * @return Gives a full list of campaigns in the system
>>>>>>>>>>        */
>>>>>>>>>>       @Path("/fullcampaigns")
>>>>>>>>>>       @GET
>>>>>>>>>>       @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>>       @Override
>>>>>>>>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>>>>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>>>>>           return businessService.getFullCampaigns();
>>>>>>>>>>       }
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>> I will test it now..
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>>>>
>>>>>>>>>>> The Swagger integration provides a feature. So adding this
>>>>>>>>>>> should be
>>>>>>>>>>>
>>>>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>>>>>
>>>>>>>>>>>> You create an intent service like this:
>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>>>>>
>>>>>>>>>>>> and add it to the service:
>>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>>>>>
>>>>>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>>>>>
>>>>>>>>>>>> I also thought about supporting the @Features annotation on
>>>>>>>>>>>> DOSGi
>>>>>>>>>>>> service  to provide a simple way to add features that do not
>>>>>>>>>>>> need
>>>>>>>>>>>> additional config.
>>>>>>>>>>>>
>>>>>>>>>>>> Christian
>>>>>>>>>>>>
>>>>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Guys
>>>>>>>>>>>>
>>>>>>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>>>>>>>> down the
>>>>>>>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>>>>>>>> okay I've
>>>>>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>>>>>> wondering if
>>>>>>>>>>>>> its
>>>>>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>>
>>>>>>>>>>>>> Christian Schneider
>>>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>>>
>>>>>>>>>>>> Open Source Architect
>>>>>>>>>>>> http://www.talend.com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>>
>>>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>>>> Nino Martinez
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>> Christian Schneider
>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>
>>>>>>>>> Open Source Architect
>>>>>>>>> http://www.talend.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Sergey Beryozkin
>>>>>>
>>>>>> Talend Community Coders
>>>>>> http://coders.talend.com/
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Sergey Beryozkin <sb...@gmail.com>.
I know disabling a scan did help some of my colleagues to make it work 
OSGI...

Sergey
On 06/04/17 15:44, Sergey Beryozkin wrote:
> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
> Swagger2featire does in that demo, and I guess then compare to what is
> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>
> Cheers, Sergey
> On 06/04/17 15:05, nino martinez wael wrote:
>> I will look into making a test project.
>>
>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>> swagger are not complaining, I have manually referred to the package
>>> for it
>>> to look.
>>>
>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>> nino.martinez.wael@gmail.com> wrote:
>>>
>>>> Let me just check.. I think I am using the wrong version of swagger..I
>>>> did a manual feature, for karaf... this feature should be used :
>>>> cxf-rs-description-swagger2
>>>>
>>>> Let me just verify..
>>>>
>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sb...@gmail.com>
>>>> wrote:
>>>>
>>>>> Yes, sometimes setScan(false) helps
>>>>>
>>>>> Sergey
>>>>>
>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>
>>>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>>>> works like this in OSGi?
>>>>>>
>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>> willing to
>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>> would be
>>>>>> a great feature for remote services.
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>>
>>>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>>>> aware of
>>>>>>> my endpoint.. However I have swagger ui running (although since
>>>>>>> swagger
>>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>>
>>>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>>>> does
>>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>>
>>>>>>> @Component //
>>>>>>>          (
>>>>>>>                  property =
>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>>> //
>>>>>>>          )
>>>>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>>>>
>>>>>>>      private String version = "";
>>>>>>>      private String name = "";
>>>>>>>
>>>>>>>      @Activate
>>>>>>>      public void activate(BundleContext bundleContext) {
>>>>>>>          Dictionary<String, String> headers =
>>>>>>> bundleContext.getBundle().getHeaders();
>>>>>>>          version = headers.get("Bundle-Version");
>>>>>>>          name = headers.get("Bundle-Name");
>>>>>>>
>>>>>>>
>>>>>>>      }
>>>>>>>
>>>>>>>
>>>>>>>      @Override
>>>>>>>      public List<Object> call() throws Exception {
>>>>>>>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>>>>>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>>>          swagger2Feature.setTitle(name);
>>>>>>>          swagger2Feature.setDescription(name);
>>>>>>>          swagger2Feature.setLicense("Commercial");
>>>>>>>          swagger2Feature.setSupportSwaggerUi(true);
>>>>>>>          swagger2Feature.setContact("development@");
>>>>>>>          swagger2Feature.setScan(true);
>>>>>>>          swagger2Feature.setScanAllResources(true);
>>>>>>>          swagger2Feature.setUsePathBasedConfig(true);
>>>>>>>
>>>>>>>
>>>>>>>          swagger2Feature.setPrettyPrint(true);
>>>>>>>          swagger2Feature.setVersion(version);
>>>>>>>
>>>>>>>          return Arrays.asList((swagger2Feature));
>>>>>>>      }
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks for the mention about logger interceptors.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>>>> <chris@die-schneider.net
>>>>>>>
>>>>>>>> wrote:
>>>>>>>> How do you export the swagger intent?
>>>>>>>>
>>>>>>>> Btw. The interceptors property will not work but you can add the
>>>>>>>> logging
>>>>>>>> Feature to the swagger intent service.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>>
>>>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>>>>
>>>>>>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF
>>>>>>>>> picks
>>>>>>>>> them up..
>>>>>>>>>
>>>>>>>>> here a short sample:
>>>>>>>>>
>>>>>>>>> @Path("/")
>>>>>>>>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>>>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>>>>           property
>>>>>>>>>                   = //
>>>>>>>>>                   { //
>>>>>>>>>                           "service.exported.intents=swagger",
>>>>>>>>>                           "service.exported.interfaces=*",
>>>>>>>>>                           "service.exported.configs=org.
>>>>>>>>> apache.cxf.rs",
>>>>>>>>>                           "org.apache.cxf.rs.address=/dialer/v1/",
>>>>>>>>>
>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>> r.LoggingInInterceptor",
>>>>>>>>>
>>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>>> r.LoggingOutInterceptor"
>>>>>>>>>                   })
>>>>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>>>>
>>>>>>>>>       private BusinessService businessService;
>>>>>>>>>       private static org.slf4j.Logger logger =
>>>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>>>>
>>>>>>>>>       /**
>>>>>>>>>        * @return Gives a full list of campaigns in the system
>>>>>>>>>        */
>>>>>>>>>       @Path("/fullcampaigns")
>>>>>>>>>       @GET
>>>>>>>>>       @Produces({MediaType.APPLICATION_JSON,
>>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>>       @Override
>>>>>>>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>>>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>>>>           return businessService.getFullCampaigns();
>>>>>>>>>       }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>> I will test it now..
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>>>
>>>>>>>>>> The Swagger integration provides a feature. So adding this
>>>>>>>>>> should be
>>>>>>>>>>
>>>>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>>>>
>>>>>>>>>>> You create an intent service like this:
>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>>>>
>>>>>>>>>>> and add it to the service:
>>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>>>>
>>>>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>>>>
>>>>>>>>>>> I also thought about supporting the @Features annotation on
>>>>>>>>>>> DOSGi
>>>>>>>>>>> service  to provide a simple way to add features that do not
>>>>>>>>>>> need
>>>>>>>>>>> additional config.
>>>>>>>>>>>
>>>>>>>>>>> Christian
>>>>>>>>>>>
>>>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Guys
>>>>>>>>>>>
>>>>>>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>>>>>>> down the
>>>>>>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>>>>>>> okay I've
>>>>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>>>>> wondering if
>>>>>>>>>>>> its
>>>>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>>
>>>>>>>>>>> Christian Schneider
>>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>>
>>>>>>>>>>> Open Source Architect
>>>>>>>>>>> http://www.talend.com
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>>> Nino Martinez
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>> Christian Schneider
>>>>>>>> http://www.liquid-reality.de
>>>>>>>>
>>>>>>>> Open Source Architect
>>>>>>>> http://www.talend.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Sergey Beryozkin
>>>>>
>>>>> Talend Community Coders
>>>>> http://coders.talend.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>
>>
>>
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: DOSGI 2 prefered documentation technique?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi, to be honest, I do not know if it is expected to work with DOSGi2,
have a look please at the 'plain' Swagger2 OSGI demo, and debug what 
Swagger2featire does in that demo, and I guess then compare to what is 
happening with DOSGI, I think it needs to be at least CXF 3.1.10

Cheers, Sergey
On 06/04/17 15:05, nino martinez wael wrote:
> I will look into making a test project.
>
> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
>
>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>> swagger are not complaining, I have manually referred to the package for it
>> to look.
>>
>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>>> Let me just check.. I think I am using the wrong version of swagger..I
>>> did a manual feature, for karaf... this feature should be used :
>>> cxf-rs-description-swagger2
>>>
>>> Let me just verify..
>>>
>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sb...@gmail.com>
>>> wrote:
>>>
>>>> Yes, sometimes setScan(false) helps
>>>>
>>>> Sergey
>>>>
>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>
>>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>>> works like this in OSGi?
>>>>>
>>>>> Can you maybe put your test project into a github repo ? I am willing to
>>>>> invest a bit of time to help make this work as I think swagger would be
>>>>> a great feature for remote services.
>>>>>
>>>>> Christian
>>>>>
>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>
>>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>>> aware of
>>>>>> my endpoint.. However I have swagger ui running (although since swagger
>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>
>>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>>> does
>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>
>>>>>> @Component //
>>>>>>          (
>>>>>>                  property = "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>> //
>>>>>>          )
>>>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>>>
>>>>>>      private String version = "";
>>>>>>      private String name = "";
>>>>>>
>>>>>>      @Activate
>>>>>>      public void activate(BundleContext bundleContext) {
>>>>>>          Dictionary<String, String> headers =
>>>>>> bundleContext.getBundle().getHeaders();
>>>>>>          version = headers.get("Bundle-Version");
>>>>>>          name = headers.get("Bundle-Name");
>>>>>>
>>>>>>
>>>>>>      }
>>>>>>
>>>>>>
>>>>>>      @Override
>>>>>>      public List<Object> call() throws Exception {
>>>>>>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>>>>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>>          swagger2Feature.setTitle(name);
>>>>>>          swagger2Feature.setDescription(name);
>>>>>>          swagger2Feature.setLicense("Commercial");
>>>>>>          swagger2Feature.setSupportSwaggerUi(true);
>>>>>>          swagger2Feature.setContact("development@");
>>>>>>          swagger2Feature.setScan(true);
>>>>>>          swagger2Feature.setScanAllResources(true);
>>>>>>          swagger2Feature.setUsePathBasedConfig(true);
>>>>>>
>>>>>>
>>>>>>          swagger2Feature.setPrettyPrint(true);
>>>>>>          swagger2Feature.setVersion(version);
>>>>>>
>>>>>>          return Arrays.asList((swagger2Feature));
>>>>>>      }
>>>>>>
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks for the mention about logger interceptors.
>>>>>>
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>>> <chris@die-schneider.net
>>>>>>
>>>>>>> wrote:
>>>>>>> How do you export the swagger intent?
>>>>>>>
>>>>>>> Btw. The interceptors property will not work but you can add the
>>>>>>> logging
>>>>>>> Feature to the swagger intent service.
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>>
>>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>>>
>>>>>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF
>>>>>>>> picks
>>>>>>>> them up..
>>>>>>>>
>>>>>>>> here a short sample:
>>>>>>>>
>>>>>>>> @Path("/")
>>>>>>>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>>>           property
>>>>>>>>                   = //
>>>>>>>>                   { //
>>>>>>>>                           "service.exported.intents=swagger",
>>>>>>>>                           "service.exported.interfaces=*",
>>>>>>>>                           "service.exported.configs=org.
>>>>>>>> apache.cxf.rs",
>>>>>>>>                           "org.apache.cxf.rs.address=/dialer/v1/",
>>>>>>>>
>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>> r.LoggingInInterceptor",
>>>>>>>>
>>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>>> r.LoggingOutInterceptor"
>>>>>>>>                   })
>>>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>>>
>>>>>>>>       private BusinessService businessService;
>>>>>>>>       private static org.slf4j.Logger logger =
>>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>>>
>>>>>>>>       /**
>>>>>>>>        * @return Gives a full list of campaigns in the system
>>>>>>>>        */
>>>>>>>>       @Path("/fullcampaigns")
>>>>>>>>       @GET
>>>>>>>>       @Produces({MediaType.APPLICATION_JSON,
>>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>>       @Override
>>>>>>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>>>           return businessService.getFullCampaigns();
>>>>>>>>       }
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>>
>>>>>>>> I will test it now..
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>>
>>>>>>>>> The Swagger integration provides a feature. So adding this should be
>>>>>>>>>
>>>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>>>
>>>>>>>>>> You create an intent service like this:
>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>>>
>>>>>>>>>> and add it to the service:
>>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>>>
>>>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>>>
>>>>>>>>>> I also thought about supporting the @Features annotation on DOSGi
>>>>>>>>>> service  to provide a simple way to add features that do not need
>>>>>>>>>> additional config.
>>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Guys
>>>>>>>>>>
>>>>>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>>>>>> down the
>>>>>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>>>>>> okay I've
>>>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>>>> wondering if
>>>>>>>>>>> its
>>>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>> Christian Schneider
>>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>>
>>>>>>>>>> Open Source Architect
>>>>>>>>>> http://www.talend.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>>> Nino Martinez
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --
>>>>>>> Christian Schneider
>>>>>>> http://www.liquid-reality.de
>>>>>>>
>>>>>>> Open Source Architect
>>>>>>> http://www.talend.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
I will look into making a test project.

On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> Nope did not fix it.. setScan(false) did not help.. And wondering why
> swagger are not complaining, I have manually referred to the package for it
> to look.
>
> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
>
>> Let me just check.. I think I am using the wrong version of swagger..I
>> did a manual feature, for karaf... this feature should be used :
>> cxf-rs-description-swagger2
>>
>> Let me just verify..
>>
>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sb...@gmail.com>
>> wrote:
>>
>>> Yes, sometimes setScan(false) helps
>>>
>>> Sergey
>>>
>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>
>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>> works like this in OSGi?
>>>>
>>>> Can you maybe put your test project into a github repo ? I am willing to
>>>> invest a bit of time to help make this work as I think swagger would be
>>>> a great feature for remote services.
>>>>
>>>> Christian
>>>>
>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>
>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>> aware of
>>>>> my endpoint.. However I have swagger ui running (although since swagger
>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>
>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>> does
>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>
>>>>> @Component //
>>>>>          (
>>>>>                  property = "org.apache.cxf.dosgi.IntentName=swagger"
>>>>> //
>>>>>          )
>>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>>
>>>>>      private String version = "";
>>>>>      private String name = "";
>>>>>
>>>>>      @Activate
>>>>>      public void activate(BundleContext bundleContext) {
>>>>>          Dictionary<String, String> headers =
>>>>> bundleContext.getBundle().getHeaders();
>>>>>          version = headers.get("Bundle-Version");
>>>>>          name = headers.get("Bundle-Name");
>>>>>
>>>>>
>>>>>      }
>>>>>
>>>>>
>>>>>      @Override
>>>>>      public List<Object> call() throws Exception {
>>>>>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>>>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>          swagger2Feature.setTitle(name);
>>>>>          swagger2Feature.setDescription(name);
>>>>>          swagger2Feature.setLicense("Commercial");
>>>>>          swagger2Feature.setSupportSwaggerUi(true);
>>>>>          swagger2Feature.setContact("development@");
>>>>>          swagger2Feature.setScan(true);
>>>>>          swagger2Feature.setScanAllResources(true);
>>>>>          swagger2Feature.setUsePathBasedConfig(true);
>>>>>
>>>>>
>>>>>          swagger2Feature.setPrettyPrint(true);
>>>>>          swagger2Feature.setVersion(version);
>>>>>
>>>>>          return Arrays.asList((swagger2Feature));
>>>>>      }
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks for the mention about logger interceptors.
>>>>>
>>>>>
>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>> <chris@die-schneider.net
>>>>>
>>>>>> wrote:
>>>>>> How do you export the swagger intent?
>>>>>>
>>>>>> Btw. The interceptors property will not work but you can add the
>>>>>> logging
>>>>>> Feature to the swagger intent service.
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>>
>>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>>
>>>>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF
>>>>>>> picks
>>>>>>> them up..
>>>>>>>
>>>>>>> here a short sample:
>>>>>>>
>>>>>>> @Path("/")
>>>>>>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>>           property
>>>>>>>                   = //
>>>>>>>                   { //
>>>>>>>                           "service.exported.intents=swagger",
>>>>>>>                           "service.exported.interfaces=*",
>>>>>>>                           "service.exported.configs=org.
>>>>>>> apache.cxf.rs",
>>>>>>>                           "org.apache.cxf.rs.address=/dialer/v1/",
>>>>>>>
>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>> r.LoggingInInterceptor",
>>>>>>>
>>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>>> r.LoggingOutInterceptor"
>>>>>>>                   })
>>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>>
>>>>>>>       private BusinessService businessService;
>>>>>>>       private static org.slf4j.Logger logger =
>>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>>
>>>>>>>       /**
>>>>>>>        * @return Gives a full list of campaigns in the system
>>>>>>>        */
>>>>>>>       @Path("/fullcampaigns")
>>>>>>>       @GET
>>>>>>>       @Produces({MediaType.APPLICATION_JSON,
>>>>>>> MediaType.APPLICATION_XML})
>>>>>>>       @Override
>>>>>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>>           return businessService.getFullCampaigns();
>>>>>>>       }
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>>
>>>>>>> I will test it now..
>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>>
>>>>>>>> The Swagger integration provides a feature. So adding this should be
>>>>>>>>
>>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>>
>>>>>>>>> You create an intent service like this:
>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>>
>>>>>>>>> and add it to the service:
>>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>>
>>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>>
>>>>>>>>> I also thought about supporting the @Features annotation on DOSGi
>>>>>>>>> service  to provide a simple way to add features that do not need
>>>>>>>>> additional config.
>>>>>>>>>
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>>
>>>>>>>>> Hi Guys
>>>>>>>>>
>>>>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>>>>> down the
>>>>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>>>>> okay I've
>>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>>> wondering if
>>>>>>>>>> its
>>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>> Christian Schneider
>>>>>>>>> http://www.liquid-reality.de
>>>>>>>>>
>>>>>>>>> Open Source Architect
>>>>>>>>> http://www.talend.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>> Best regards / Med venlig hilsen
>>>>>>>> Nino Martinez
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>> Christian Schneider
>>>>>> http://www.liquid-reality.de
>>>>>>
>>>>>> Open Source Architect
>>>>>> http://www.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
Nope did not fix it.. setScan(false) did not help.. And wondering why
swagger are not complaining, I have manually referred to the package for it
to look.

On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> Let me just check.. I think I am using the wrong version of swagger..I did
> a manual feature, for karaf... this feature should be used :
> cxf-rs-description-swagger2
>
> Let me just verify..
>
> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sb...@gmail.com>
> wrote:
>
>> Yes, sometimes setScan(false) helps
>>
>> Sergey
>>
>> On 06/04/17 14:32, Christian Schneider wrote:
>>
>>> I am not very familiar with how Swagger works. Are you sure the scan
>>> works like this in OSGi?
>>>
>>> Can you maybe put your test project into a github repo ? I am willing to
>>> invest a bit of time to help make this work as I think swagger would be
>>> a great feature for remote services.
>>>
>>> Christian
>>>
>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>
>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>> aware of
>>>> my endpoint.. However I have swagger ui running (although since swagger
>>>> cannot see my endpoints, it's somewhat empty)...
>>>>
>>>> RSA does pickup the swagger intent, and all are "working" except it does
>>>> not see my endpoints. I get both swagger json and yaml.
>>>>
>>>> @Component //
>>>>          (
>>>>                  property = "org.apache.cxf.dosgi.IntentName=swagger"
>>>> //
>>>>          )
>>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>>
>>>>      private String version = "";
>>>>      private String name = "";
>>>>
>>>>      @Activate
>>>>      public void activate(BundleContext bundleContext) {
>>>>          Dictionary<String, String> headers =
>>>> bundleContext.getBundle().getHeaders();
>>>>          version = headers.get("Bundle-Version");
>>>>          name = headers.get("Bundle-Name");
>>>>
>>>>
>>>>      }
>>>>
>>>>
>>>>      @Override
>>>>      public List<Object> call() throws Exception {
>>>>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>          swagger2Feature.setTitle(name);
>>>>          swagger2Feature.setDescription(name);
>>>>          swagger2Feature.setLicense("Commercial");
>>>>          swagger2Feature.setSupportSwaggerUi(true);
>>>>          swagger2Feature.setContact("development@");
>>>>          swagger2Feature.setScan(true);
>>>>          swagger2Feature.setScanAllResources(true);
>>>>          swagger2Feature.setUsePathBasedConfig(true);
>>>>
>>>>
>>>>          swagger2Feature.setPrettyPrint(true);
>>>>          swagger2Feature.setVersion(version);
>>>>
>>>>          return Arrays.asList((swagger2Feature));
>>>>      }
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Thanks for the mention about logger interceptors.
>>>>
>>>>
>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>> <chris@die-schneider.net
>>>>
>>>>> wrote:
>>>>> How do you export the swagger intent?
>>>>>
>>>>> Btw. The interceptors property will not work but you can add the
>>>>> logging
>>>>> Feature to the swagger intent service.
>>>>>
>>>>> Christian
>>>>>
>>>>>
>>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>>
>>>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF
>>>>>> picks
>>>>>> them up..
>>>>>>
>>>>>> here a short sample:
>>>>>>
>>>>>> @Path("/")
>>>>>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>>           property
>>>>>>                   = //
>>>>>>                   { //
>>>>>>                           "service.exported.intents=swagger",
>>>>>>                           "service.exported.interfaces=*",
>>>>>>                           "service.exported.configs=org.apache.cxf.rs
>>>>>> ",
>>>>>>                           "org.apache.cxf.rs.address=/dialer/v1/",
>>>>>>
>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>> r.LoggingInInterceptor",
>>>>>>
>>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>>> r.LoggingOutInterceptor"
>>>>>>                   })
>>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>>
>>>>>>       private BusinessService businessService;
>>>>>>       private static org.slf4j.Logger logger =
>>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>>
>>>>>>       /**
>>>>>>        * @return Gives a full list of campaigns in the system
>>>>>>        */
>>>>>>       @Path("/fullcampaigns")
>>>>>>       @GET
>>>>>>       @Produces({MediaType.APPLICATION_JSON,
>>>>>> MediaType.APPLICATION_XML})
>>>>>>       @Override
>>>>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>>>>> CiscoAPIException, FailedSecurityException {
>>>>>>           return businessService.getFullCampaigns();
>>>>>>       }
>>>>>>
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>>
>>>>>> I will test it now..
>>>>>>
>>>>>>>
>>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>>> chris@die-schneider.net> wrote:
>>>>>>>
>>>>>>> The Swagger integration provides a feature. So adding this should be
>>>>>>>
>>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>>
>>>>>>>> You create an intent service like this:
>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>> t/impl/JacksonIntent.java
>>>>>>>>
>>>>>>>> and add it to the service:
>>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>>
>>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>>
>>>>>>>> I also thought about supporting the @Features annotation on DOSGi
>>>>>>>> service  to provide a simple way to add features that do not need
>>>>>>>> additional config.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>>
>>>>>>>> Hi Guys
>>>>>>>>
>>>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>>>> down the
>>>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>>>> okay I've
>>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>>> wondering if
>>>>>>>>> its
>>>>>>>>> possible to use those with DOSGI?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>> Christian Schneider
>>>>>>>> http://www.liquid-reality.de
>>>>>>>>
>>>>>>>> Open Source Architect
>>>>>>>> http://www.talend.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>> Best regards / Med venlig hilsen
>>>>>>> Nino Martinez
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>> Christian Schneider
>>>>> http://www.liquid-reality.de
>>>>>
>>>>> Open Source Architect
>>>>> http://www.talend.com
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
Let me just check.. I think I am using the wrong version of swagger..I did
a manual feature, for karaf... this feature should be used :
cxf-rs-description-swagger2

Let me just verify..

On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sb...@gmail.com>
wrote:

> Yes, sometimes setScan(false) helps
>
> Sergey
>
> On 06/04/17 14:32, Christian Schneider wrote:
>
>> I am not very familiar with how Swagger works. Are you sure the scan
>> works like this in OSGi?
>>
>> Can you maybe put your test project into a github repo ? I am willing to
>> invest a bit of time to help make this work as I think swagger would be
>> a great feature for remote services.
>>
>> Christian
>>
>> On 06.04.2017 15:12, nino martinez wael wrote:
>>
>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>> aware of
>>> my endpoint.. However I have swagger ui running (although since swagger
>>> cannot see my endpoints, it's somewhat empty)...
>>>
>>> RSA does pickup the swagger intent, and all are "working" except it does
>>> not see my endpoints. I get both swagger json and yaml.
>>>
>>> @Component //
>>>          (
>>>                  property = "org.apache.cxf.dosgi.IntentName=swagger" //
>>>          )
>>> public class SwaggerIntent implements Callable<List<Object>> {
>>>
>>>      private String version = "";
>>>      private String name = "";
>>>
>>>      @Activate
>>>      public void activate(BundleContext bundleContext) {
>>>          Dictionary<String, String> headers =
>>> bundleContext.getBundle().getHeaders();
>>>          version = headers.get("Bundle-Version");
>>>          name = headers.get("Bundle-Name");
>>>
>>>
>>>      }
>>>
>>>
>>>      @Override
>>>      public List<Object> call() throws Exception {
>>>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>          swagger2Feature.setTitle(name);
>>>          swagger2Feature.setDescription(name);
>>>          swagger2Feature.setLicense("Commercial");
>>>          swagger2Feature.setSupportSwaggerUi(true);
>>>          swagger2Feature.setContact("development@");
>>>          swagger2Feature.setScan(true);
>>>          swagger2Feature.setScanAllResources(true);
>>>          swagger2Feature.setUsePathBasedConfig(true);
>>>
>>>
>>>          swagger2Feature.setPrettyPrint(true);
>>>          swagger2Feature.setVersion(version);
>>>
>>>          return Arrays.asList((swagger2Feature));
>>>      }
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>> Thanks for the mention about logger interceptors.
>>>
>>>
>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>> <chris@die-schneider.net
>>>
>>>> wrote:
>>>> How do you export the swagger intent?
>>>>
>>>> Btw. The interceptors property will not work but you can add the logging
>>>> Feature to the swagger intent service.
>>>>
>>>> Christian
>>>>
>>>>
>>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>>
>>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF
>>>>> picks
>>>>> them up..
>>>>>
>>>>> here a short sample:
>>>>>
>>>>> @Path("/")
>>>>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>>           property
>>>>>                   = //
>>>>>                   { //
>>>>>                           "service.exported.intents=swagger",
>>>>>                           "service.exported.interfaces=*",
>>>>>                           "service.exported.configs=org.apache.cxf.rs
>>>>> ",
>>>>>                           "org.apache.cxf.rs.address=/dialer/v1/",
>>>>>
>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>> r.LoggingInInterceptor",
>>>>>
>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>> r.LoggingOutInterceptor"
>>>>>                   })
>>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>>
>>>>>       private BusinessService businessService;
>>>>>       private static org.slf4j.Logger logger =
>>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>>
>>>>>       /**
>>>>>        * @return Gives a full list of campaigns in the system
>>>>>        */
>>>>>       @Path("/fullcampaigns")
>>>>>       @GET
>>>>>       @Produces({MediaType.APPLICATION_JSON,
>>>>> MediaType.APPLICATION_XML})
>>>>>       @Override
>>>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>>>> CiscoAPIException, FailedSecurityException {
>>>>>           return businessService.getFullCampaigns();
>>>>>       }
>>>>>
>>>>>
>>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>>> nino.martinez.wael@gmail.com> wrote:
>>>>>
>>>>> I will test it now..
>>>>>
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>>> chris@die-schneider.net> wrote:
>>>>>>
>>>>>> The Swagger integration provides a feature. So adding this should be
>>>>>>
>>>>>>> quite similar to adding the Jackson provider.
>>>>>>>
>>>>>>> You create an intent service like this:
>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>> t/impl/JacksonIntent.java
>>>>>>>
>>>>>>> and add it to the service:
>>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>>
>>>>>>> Can you test this and give Feedback if it works.
>>>>>>>
>>>>>>> I also thought about supporting the @Features annotation on DOSGi
>>>>>>> service  to provide a simple way to add features that do not need
>>>>>>> additional config.
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>>
>>>>>>> Hi Guys
>>>>>>>
>>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>>> down the
>>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>>> okay I've
>>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>>> wondering if
>>>>>>>> its
>>>>>>>> possible to use those with DOSGI?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>> Christian Schneider
>>>>>>> http://www.liquid-reality.de
>>>>>>>
>>>>>>> Open Source Architect
>>>>>>> http://www.talend.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>> Best regards / Med venlig hilsen
>>>>>> Nino Martinez
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>>
>>>> Open Source Architect
>>>> http://www.talend.com
>>>>
>>>>
>>>>
>>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Yes, sometimes setScan(false) helps

Sergey
On 06/04/17 14:32, Christian Schneider wrote:
> I am not very familiar with how Swagger works. Are you sure the scan
> works like this in OSGi?
>
> Can you maybe put your test project into a github repo ? I am willing to
> invest a bit of time to help make this work as I think swagger would be
> a great feature for remote services.
>
> Christian
>
> On 06.04.2017 15:12, nino martinez wael wrote:
>> I've fiddled a lot, nothing seems to work in order to make swagger
>> aware of
>> my endpoint.. However I have swagger ui running (although since swagger
>> cannot see my endpoints, it's somewhat empty)...
>>
>> RSA does pickup the swagger intent, and all are "working" except it does
>> not see my endpoints. I get both swagger json and yaml.
>>
>> @Component //
>>          (
>>                  property = "org.apache.cxf.dosgi.IntentName=swagger" //
>>          )
>> public class SwaggerIntent implements Callable<List<Object>> {
>>
>>      private String version = "";
>>      private String name = "";
>>
>>      @Activate
>>      public void activate(BundleContext bundleContext) {
>>          Dictionary<String, String> headers =
>> bundleContext.getBundle().getHeaders();
>>          version = headers.get("Bundle-Version");
>>          name = headers.get("Bundle-Name");
>>
>>
>>      }
>>
>>
>>      @Override
>>      public List<Object> call() throws Exception {
>>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>          swagger2Feature.setTitle(name);
>>          swagger2Feature.setDescription(name);
>>          swagger2Feature.setLicense("Commercial");
>>          swagger2Feature.setSupportSwaggerUi(true);
>>          swagger2Feature.setContact("development@");
>>          swagger2Feature.setScan(true);
>>          swagger2Feature.setScanAllResources(true);
>>          swagger2Feature.setUsePathBasedConfig(true);
>>
>>
>>          swagger2Feature.setPrettyPrint(true);
>>          swagger2Feature.setVersion(version);
>>
>>          return Arrays.asList((swagger2Feature));
>>      }
>>
>> }
>>
>>
>>
>>
>>
>>
>> Thanks for the mention about logger interceptors.
>>
>>
>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>> <chris@die-schneider.net
>>> wrote:
>>> How do you export the swagger intent?
>>>
>>> Btw. The interceptors property will not work but you can add the logging
>>> Feature to the swagger intent service.
>>>
>>> Christian
>>>
>>>
>>> On 06.04.2017 12:45, nino martinez wael wrote:
>>>
>>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF
>>>> picks
>>>> them up..
>>>>
>>>> here a short sample:
>>>>
>>>> @Path("/")
>>>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>>           property
>>>>                   = //
>>>>                   { //
>>>>                           "service.exported.intents=swagger",
>>>>                           "service.exported.interfaces=*",
>>>>                           "service.exported.configs=org.apache.cxf.rs",
>>>>                           "org.apache.cxf.rs.address=/dialer/v1/",
>>>>
>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>> r.LoggingInInterceptor",
>>>>
>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>> r.LoggingOutInterceptor"
>>>>                   })
>>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>>
>>>>       private BusinessService businessService;
>>>>       private static org.slf4j.Logger logger =
>>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>>
>>>>       /**
>>>>        * @return Gives a full list of campaigns in the system
>>>>        */
>>>>       @Path("/fullcampaigns")
>>>>       @GET
>>>>       @Produces({MediaType.APPLICATION_JSON,
>>>> MediaType.APPLICATION_XML})
>>>>       @Override
>>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>>> CiscoAPIException, FailedSecurityException {
>>>>           return businessService.getFullCampaigns();
>>>>       }
>>>>
>>>>
>>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>>> nino.martinez.wael@gmail.com> wrote:
>>>>
>>>> I will test it now..
>>>>>
>>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>>> chris@die-schneider.net> wrote:
>>>>>
>>>>> The Swagger integration provides a feature. So adding this should be
>>>>>> quite similar to adding the Jackson provider.
>>>>>>
>>>>>> You create an intent service like this:
>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>> t/impl/JacksonIntent.java
>>>>>>
>>>>>> and add it to the service:
>>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>>
>>>>>> Can you test this and give Feedback if it works.
>>>>>>
>>>>>> I also thought about supporting the @Features annotation on DOSGi
>>>>>> service  to provide a simple way to add features that do not need
>>>>>> additional config.
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>>
>>>>>> Hi Guys
>>>>>>> I've been contemplating on documentation. Currently we've gone
>>>>>>> down the
>>>>>>> offline documentation road, using enunciate[1] while it feels
>>>>>>> okay I've
>>>>>>> seen that CXF supports other directions natively[2]. I am
>>>>>>> wondering if
>>>>>>> its
>>>>>>> possible to use those with DOSGI?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>> Christian Schneider
>>>>>> http://www.liquid-reality.de
>>>>>>
>>>>>> Open Source Architect
>>>>>> http://www.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Best regards / Med venlig hilsen
>>>>> Nino Martinez
>>>>>
>>>>>
>>>>
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>>
>>> Open Source Architect
>>> http://www.talend.com
>>>
>>>
>>
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: DOSGI 2 prefered documentation technique?

Posted by Christian Schneider <ch...@die-schneider.net>.
I am not very familiar with how Swagger works. Are you sure the scan 
works like this in OSGi?

Can you maybe put your test project into a github repo ? I am willing to 
invest a bit of time to help make this work as I think swagger would be 
a great feature for remote services.

Christian

On 06.04.2017 15:12, nino martinez wael wrote:
> I've fiddled a lot, nothing seems to work in order to make swagger aware of
> my endpoint.. However I have swagger ui running (although since swagger
> cannot see my endpoints, it's somewhat empty)...
>
> RSA does pickup the swagger intent, and all are "working" except it does
> not see my endpoints. I get both swagger json and yaml.
>
> @Component //
>          (
>                  property = "org.apache.cxf.dosgi.IntentName=swagger" //
>          )
> public class SwaggerIntent implements Callable<List<Object>> {
>
>      private String version = "";
>      private String name = "";
>
>      @Activate
>      public void activate(BundleContext bundleContext) {
>          Dictionary<String, String> headers =
> bundleContext.getBundle().getHeaders();
>          version = headers.get("Bundle-Version");
>          name = headers.get("Bundle-Name");
>
>
>      }
>
>
>      @Override
>      public List<Object> call() throws Exception {
>          Swagger2Feature swagger2Feature = new Swagger2Feature();
>          swagger2Feature.setBasePath("/cxf/dialer/v1/");
>          swagger2Feature.setTitle(name);
>          swagger2Feature.setDescription(name);
>          swagger2Feature.setLicense("Commercial");
>          swagger2Feature.setSupportSwaggerUi(true);
>          swagger2Feature.setContact("development@");
>          swagger2Feature.setScan(true);
>          swagger2Feature.setScanAllResources(true);
>          swagger2Feature.setUsePathBasedConfig(true);
>
>
>          swagger2Feature.setPrettyPrint(true);
>          swagger2Feature.setVersion(version);
>
>          return Arrays.asList((swagger2Feature));
>      }
>
> }
>
>
>
>
>
>
> Thanks for the mention about logger interceptors.
>
>
> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider <chris@die-schneider.net
>> wrote:
>> How do you export the swagger intent?
>>
>> Btw. The interceptors property will not work but you can add the logging
>> Feature to the swagger intent service.
>>
>> Christian
>>
>>
>> On 06.04.2017 12:45, nino martinez wael wrote:
>>
>>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF picks
>>> them up..
>>>
>>> here a short sample:
>>>
>>> @Path("/")
>>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>>           property
>>>                   = //
>>>                   { //
>>>                           "service.exported.intents=swagger",
>>>                           "service.exported.interfaces=*",
>>>                           "service.exported.configs=org.apache.cxf.rs",
>>>                           "org.apache.cxf.rs.address=/dialer/v1/",
>>>
>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>> r.LoggingInInterceptor",
>>>
>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>> r.LoggingOutInterceptor"
>>>                   })
>>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>>
>>>       private BusinessService businessService;
>>>       private static org.slf4j.Logger logger =
>>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>>
>>>       /**
>>>        * @return Gives a full list of campaigns in the system
>>>        */
>>>       @Path("/fullcampaigns")
>>>       @GET
>>>       @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>>       @Override
>>>       public List<FullCampaign> getAllCampaignsStatus() throws
>>> CiscoAPIException, FailedSecurityException {
>>>           return businessService.getFullCampaigns();
>>>       }
>>>
>>>
>>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>>> nino.martinez.wael@gmail.com> wrote:
>>>
>>> I will test it now..
>>>>
>>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>>> chris@die-schneider.net> wrote:
>>>>
>>>> The Swagger integration provides a feature. So adding this should be
>>>>> quite similar to adding the Jackson provider.
>>>>>
>>>>> You create an intent service like this:
>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>> t/impl/JacksonIntent.java
>>>>>
>>>>> and add it to the service:
>>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>>> t/impl/TaskResourceImpl.java#L36
>>>>>
>>>>> Can you test this and give Feedback if it works.
>>>>>
>>>>> I also thought about supporting the @Features annotation on DOSGi
>>>>> service  to provide a simple way to add features that do not need
>>>>> additional config.
>>>>>
>>>>> Christian
>>>>>
>>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>>
>>>>> Hi Guys
>>>>>> I've been contemplating on documentation. Currently we've gone down the
>>>>>> offline documentation road, using enunciate[1] while it feels okay I've
>>>>>> seen that CXF supports other directions natively[2]. I am wondering if
>>>>>> its
>>>>>> possible to use those with DOSGI?
>>>>>>
>>>>>>
>>>>>>
>>>>>> [1]http://enunciate.webcohesion.com/
>>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>> Christian Schneider
>>>>> http://www.liquid-reality.de
>>>>>
>>>>> Open Source Architect
>>>>> http://www.talend.com
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>>
>>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> http://www.talend.com
>>
>>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
I've fiddled a lot, nothing seems to work in order to make swagger aware of
my endpoint.. However I have swagger ui running (although since swagger
cannot see my endpoints, it's somewhat empty)...

RSA does pickup the swagger intent, and all are "working" except it does
not see my endpoints. I get both swagger json and yaml.

@Component //
        (
                property = "org.apache.cxf.dosgi.IntentName=swagger" //
        )
public class SwaggerIntent implements Callable<List<Object>> {

    private String version = "";
    private String name = "";

    @Activate
    public void activate(BundleContext bundleContext) {
        Dictionary<String, String> headers =
bundleContext.getBundle().getHeaders();
        version = headers.get("Bundle-Version");
        name = headers.get("Bundle-Name");


    }


    @Override
    public List<Object> call() throws Exception {
        Swagger2Feature swagger2Feature = new Swagger2Feature();
        swagger2Feature.setBasePath("/cxf/dialer/v1/");
        swagger2Feature.setTitle(name);
        swagger2Feature.setDescription(name);
        swagger2Feature.setLicense("Commercial");
        swagger2Feature.setSupportSwaggerUi(true);
        swagger2Feature.setContact("development@");
        swagger2Feature.setScan(true);
        swagger2Feature.setScanAllResources(true);
        swagger2Feature.setUsePathBasedConfig(true);


        swagger2Feature.setPrettyPrint(true);
        swagger2Feature.setVersion(version);

        return Arrays.asList((swagger2Feature));
    }

}






Thanks for the mention about logger interceptors.


On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider <chris@die-schneider.net
> wrote:

> How do you export the swagger intent?
>
> Btw. The interceptors property will not work but you can add the logging
> Feature to the swagger intent service.
>
> Christian
>
>
> On 06.04.2017 12:45, nino martinez wael wrote:
>
>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF picks
>> them up..
>>
>> here a short sample:
>>
>> @Path("/")
>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>          property
>>                  = //
>>                  { //
>>                          "service.exported.intents=swagger",
>>                          "service.exported.interfaces=*",
>>                          "service.exported.configs=org.apache.cxf.rs",
>>                          "org.apache.cxf.rs.address=/dialer/v1/",
>>
>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>> r.LoggingInInterceptor",
>>
>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>> r.LoggingOutInterceptor"
>>                  })
>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>
>>      private BusinessService businessService;
>>      private static org.slf4j.Logger logger =
>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>
>>      /**
>>       * @return Gives a full list of campaigns in the system
>>       */
>>      @Path("/fullcampaigns")
>>      @GET
>>      @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>      @Override
>>      public List<FullCampaign> getAllCampaignsStatus() throws
>> CiscoAPIException, FailedSecurityException {
>>          return businessService.getFullCampaigns();
>>      }
>>
>>
>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>> nino.martinez.wael@gmail.com> wrote:
>>
>> I will test it now..
>>>
>>>
>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>> chris@die-schneider.net> wrote:
>>>
>>> The Swagger integration provides a feature. So adding this should be
>>>> quite similar to adding the Jackson provider.
>>>>
>>>> You create an intent service like this:
>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>> t/impl/JacksonIntent.java
>>>>
>>>> and add it to the service:
>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>> t/impl/TaskResourceImpl.java#L36
>>>>
>>>> Can you test this and give Feedback if it works.
>>>>
>>>> I also thought about supporting the @Features annotation on DOSGi
>>>> service  to provide a simple way to add features that do not need
>>>> additional config.
>>>>
>>>> Christian
>>>>
>>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>>
>>>> Hi Guys
>>>>>
>>>>> I've been contemplating on documentation. Currently we've gone down the
>>>>> offline documentation road, using enunciate[1] while it feels okay I've
>>>>> seen that CXF supports other directions natively[2]. I am wondering if
>>>>> its
>>>>> possible to use those with DOSGI?
>>>>>
>>>>>
>>>>>
>>>>> [1]http://enunciate.webcohesion.com/
>>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>>
>>>> Open Source Architect
>>>> http://www.talend.com
>>>>
>>>>
>>>>
>>> --
>>> Best regards / Med venlig hilsen
>>> Nino Martinez
>>>
>>>
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Christian Schneider <ch...@die-schneider.net>.
How do you export the swagger intent?

Btw. The interceptors property will not work but you can add the logging 
Feature to the swagger intent service.

Christian

On 06.04.2017 12:45, nino martinez wael wrote:
> Im having issue getting swagger to pickup my jaxrs endpoints... CXF picks
> them up..
>
> here a short sample:
>
> @Path("/")
> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>          property
>                  = //
>                  { //
>                          "service.exported.intents=swagger",
>                          "service.exported.interfaces=*",
>                          "service.exported.configs=org.apache.cxf.rs",
>                          "org.apache.cxf.rs.address=/dialer/v1/",
>
> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingInInterceptor",
>
> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingOutInterceptor"
>                  })
> public class SimpleEndPointsImpl implements SimpleEndPoints {
>
>      private BusinessService businessService;
>      private static org.slf4j.Logger logger =
> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>
>      /**
>       * @return Gives a full list of campaigns in the system
>       */
>      @Path("/fullcampaigns")
>      @GET
>      @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>      @Override
>      public List<FullCampaign> getAllCampaignsStatus() throws
> CiscoAPIException, FailedSecurityException {
>          return businessService.getFullCampaigns();
>      }
>
>
> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
> nino.martinez.wael@gmail.com> wrote:
>
>> I will test it now..
>>
>>
>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>> chris@die-schneider.net> wrote:
>>
>>> The Swagger integration provides a feature. So adding this should be
>>> quite similar to adding the Jackson provider.
>>>
>>> You create an intent service like this:
>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>> t/impl/JacksonIntent.java
>>>
>>> and add it to the service:
>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>> t/impl/TaskResourceImpl.java#L36
>>>
>>> Can you test this and give Feedback if it works.
>>>
>>> I also thought about supporting the @Features annotation on DOSGi
>>> service  to provide a simple way to add features that do not need
>>> additional config.
>>>
>>> Christian
>>>
>>> On 06.04.2017 08:04, nino martinez wael wrote:
>>>
>>>> Hi Guys
>>>>
>>>> I've been contemplating on documentation. Currently we've gone down the
>>>> offline documentation road, using enunciate[1] while it feels okay I've
>>>> seen that CXF supports other directions natively[2]. I am wondering if
>>>> its
>>>> possible to use those with DOSGI?
>>>>
>>>>
>>>>
>>>> [1]http://enunciate.webcohesion.com/
>>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>>
>>>>
>>>>
>>>>
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>>
>>> Open Source Architect
>>> http://www.talend.com
>>>
>>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
Im having issue getting swagger to pickup my jaxrs endpoints... CXF picks
them up..

here a short sample:

@Path("/")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Component(immediate = true, name = "SimpleEndPointsImpl", //
        property
                = //
                { //
                        "service.exported.intents=swagger",
                        "service.exported.interfaces=*",
                        "service.exported.configs=org.apache.cxf.rs",
                        "org.apache.cxf.rs.address=/dialer/v1/",

"org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingInInterceptor",

"org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingOutInterceptor"
                })
public class SimpleEndPointsImpl implements SimpleEndPoints {

    private BusinessService businessService;
    private static org.slf4j.Logger logger =
LoggerFactory.getLogger(BackendDaoServiceUtil.class);

    /**
     * @return Gives a full list of campaigns in the system
     */
    @Path("/fullcampaigns")
    @GET
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    @Override
    public List<FullCampaign> getAllCampaignsStatus() throws
CiscoAPIException, FailedSecurityException {
        return businessService.getFullCampaigns();
    }


On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
nino.martinez.wael@gmail.com> wrote:

> I will test it now..
>
>
> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
> chris@die-schneider.net> wrote:
>
>> The Swagger integration provides a feature. So adding this should be
>> quite similar to adding the Jackson provider.
>>
>> You create an intent service like this:
>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>> t/impl/JacksonIntent.java
>>
>> and add it to the service:
>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>> t/impl/TaskResourceImpl.java#L36
>>
>> Can you test this and give Feedback if it works.
>>
>> I also thought about supporting the @Features annotation on DOSGi
>> service  to provide a simple way to add features that do not need
>> additional config.
>>
>> Christian
>>
>> On 06.04.2017 08:04, nino martinez wael wrote:
>>
>>> Hi Guys
>>>
>>> I've been contemplating on documentation. Currently we've gone down the
>>> offline documentation road, using enunciate[1] while it feels okay I've
>>> seen that CXF supports other directions natively[2]. I am wondering if
>>> its
>>> possible to use those with DOSGI?
>>>
>>>
>>>
>>> [1]http://enunciate.webcohesion.com/
>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>
>>>
>>>
>>>
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> http://www.talend.com
>>
>>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by nino martinez wael <ni...@gmail.com>.
I will test it now..


On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <chris@die-schneider.net
> wrote:

> The Swagger integration provides a feature. So adding this should be quite
> similar to adding the Jackson provider.
>
> You create an intent service like this:
> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/
> rest/impl/JacksonIntent.java
>
> and add it to the service:
> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/
> rest/impl/TaskResourceImpl.java#L36
>
> Can you test this and give Feedback if it works.
>
> I also thought about supporting the @Features annotation on DOSGi service
> to provide a simple way to add features that do not need additional config.
>
> Christian
>
> On 06.04.2017 08:04, nino martinez wael wrote:
>
>> Hi Guys
>>
>> I've been contemplating on documentation. Currently we've gone down the
>> offline documentation road, using enunciate[1] while it feels okay I've
>> seen that CXF supports other directions natively[2]. I am wondering if its
>> possible to use those with DOSGI?
>>
>>
>>
>> [1]http://enunciate.webcohesion.com/
>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>
>>
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Best regards / Med venlig hilsen
Nino Martinez

Re: DOSGI 2 prefered documentation technique?

Posted by Christian Schneider <ch...@die-schneider.net>.
The Swagger integration provides a feature. So adding this should be 
quite similar to adding the Jackson provider.

You create an intent service like this:
https://github.com/apache/cxf-dosgi/blob/master/samples/rest/impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/rest/impl/JacksonIntent.java

and add it to the service:
https://github.com/apache/cxf-dosgi/blob/master/samples/rest/impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/rest/impl/TaskResourceImpl.java#L36

Can you test this and give Feedback if it works.

I also thought about supporting the @Features annotation on DOSGi 
service  to provide a simple way to add features that do not need 
additional config.

Christian

On 06.04.2017 08:04, nino martinez wael wrote:
> Hi Guys
>
> I've been contemplating on documentation. Currently we've gone down the
> offline documentation road, using enunciate[1] while it feels okay I've
> seen that CXF supports other directions natively[2]. I am wondering if its
> possible to use those with DOSGI?
>
>
>
> [1]http://enunciate.webcohesion.com/
> [2]http://cxf.apache.org/docs/swagger2feature.html
>
>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com