You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Vjacheslav V. Borisov" <sl...@gmail.com> on 2017/01/17 12:44:19 UTC
swagger2feature do not see javadocs ?
Hi!
Playing with
https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot
Added Javadoc to method sayHello
/**
* sayHello doc
* @param a the a param
* @return
*/
public String sayHello(String a) {
return "Hello2 " + a + ", Welcome to CXF RS Spring Boot World!!!";
}
And do not see this documentation in swagger.json / api-docs
Is javadoc parsing not implemented in swagger.json generation, or i am
missing some switch?
Re: swagger2feature do not see javadocs ?
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
Thanks!
2017-01-17 17:08 GMT+04:00 Francesco Chicchiriccò <il...@apache.org>:
> On 17-jan-17, at 13:44, Vjacheslav V. Borisov slavb18@gmail.com wrote:
>
> > Hi!
> >
> > Playing with
> > https://github.com/apache/cxf/tree/master/distribution/src/
> main/release/samples/jax_rs/spring_boot
> >
> > Added Javadoc to method sayHello
> >
> > /**
> > * sayHello doc
> > * @param a the a param
> > * @return
> > */
> > public String sayHello(String a) {
> > return "Hello2 " + a + ", Welcome to CXF RS Spring Boot World!!!";
> > }
> >
> > And do not see this documentation in swagger.json / api-docs
> >
> > Is javadoc parsing not implemented in swagger.json generation, or i am
> > missing some switch?
>
> The DefaultSwagger2Serializers class requires a JavadocProvider in order
> to be able to extract info from Javadocs; use one the methods [1] to
> configure.
>
> HTH
> Regards.
>
> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
> DefaultSwagger2Serializers.java#L198-L217
>
> --
> Francesco Chicchiriccò
>
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
>
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
>
Re: swagger2feature do not see javadocs ?
Posted by Sergey Beryozkin <sb...@gmail.com>.
Thanks, the improvement fix just just made it into 3.1.10,
http://git-wip-us.apache.org/repos/asf/cxf/commit/10fd399c
as far as the DefaultSwaggerSerializers is concerned, a
'javadocProvider' property referring to
org.apache.cxf.jaxrs.model.doc.JavaDocProvider bean has to be used
Cheers, Sergey
On 27/01/17 12:29, Vjacheslav V. Borisov wrote:
> Hi,
>
> cleaned up (no more runtime weaving)
> + tomcat7-maven-plugin (integration test)
>
> 2017-01-27 14:27 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>
>> Thanks for preparing it,
>>
>> Can you please add a Jetty or Tomcat plugin which can be used to run the
>> demo ? I was hoping to do a quick try this morning, I've tried Jetty9,
>> older Jetty Maven plugins, dropped it into a standalone Tomcat 8, the demo
>> fails to start for various reasons (no runt time weaving support, some
>> classes are missing, etc)
>>
>> Cheers, Sergey
>>
>> On 25/01/17 05:31, Vjacheslav V. Borisov wrote:
>>
>>> This is example project
>>> https://github.com/slavb18/testjavadoc
>>>
>>> 2017-01-24 16:28 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>>>
>>> Sure, I see what you mean, I did not think of it at a time.
>>>> If you could set up a Maven test project where a javadocs jar is on the
>>>> classpath then it will be easier for me to prioritize and experiment with
>>>> the parser code, otherwise a creating a dedicated CXF test module will
>>>> take
>>>> time.
>>>>
>>>> Cheers, Sergey
>>>>
>>>>
>>>> On 24/01/17 07:06, Vjacheslav V. Borisov wrote:
>>>>
>>>> No, I am talking about different (may be found impossible by author)
>>>>> realisation of javadoc parsing
>>>>> Since it is regular jar, and packaged as dependency, its contents
>>>>> accesible
>>>>> as regular classpath resource.
>>>>> Point.class.getResource("Point.html") - e.g. this is working, can get
>>>>> javadoc of class
>>>>>
>>>>> 2017-01-23 16:49 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>>>>>
>>>>> Hi
>>>>>
>>>>>>
>>>>>> Freeman did it for a java2wadl, where JavaDocs info gets collected
>>>>>> during
>>>>>> the build time, but at the runtime JavaDocs are only visible from the
>>>>>> dedicated jar.
>>>>>> I do not know how would one load a javadocs jar without knowing the
>>>>>> full
>>>>>> Jar name, perhaps it can be done based on some convention...
>>>>>>
>>>>>> Sergey
>>>>>>
>>>>>>
>>>>>> On 22/01/17 16:21, Vjacheslav V. Borisov wrote:
>>>>>>
>>>>>> Hi!
>>>>>>
>>>>>>>
>>>>>>> I have configured javadoc using this config:
>>>>>>>
>>>>>>> <bean id="swagger2Serializers"
>>>>>>> class="org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers">
>>>>>>> <property name="javaDocPath"
>>>>>>> value="WEB-INF/lib/bankaccounting-api-1.0-SNAPSHOT-javadoc.jar"/>
>>>>>>> </bean>
>>>>>>> <bean id="swagger2Feature"
>>>>>>> class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
>>>>>>> <property name="swagger2Serializers"
>>>>>>> ref="swagger2Serializers"/>
>>>>>>>
>>>>>>> But this jar is regular war dependency lib, is there possibility to
>>>>>>> configure javadoc using regular classpath, not referencing actual jar
>>>>>>> version?
>>>>>>>
>>>>>>> 2017-01-17 17:08 GMT+04:00 Francesco Chicchiricc� <
>>>>>>> ilgrosso@apache.org
>>>>>>>
>>>>>>>> :
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> The DefaultSwagger2Serializers class requires a JavadocProvider in
>>>>>>> order
>>>>>>>
>>>>>>>> to be able to extract info from Javadocs; use one the methods [1] to
>>>>>>>> configure.
>>>>>>>>
>>>>>>>> HTH
>>>>>>>> Regards.
>>>>>>>>
>>>>>>>> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
>>>>>>>> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
>>>>>>>> DefaultSwagger2Serializers.java#L198-L217
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>> Sergey Beryozkin
>>>>>>
>>>>>> Talend Community Coders
>>>>>> http://coders.talend.com/
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>>
>>>
>>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: swagger2feature do not see javadocs ?
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
Hi,
cleaned up (no more runtime weaving)
+ tomcat7-maven-plugin (integration test)
2017-01-27 14:27 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
> Thanks for preparing it,
>
> Can you please add a Jetty or Tomcat plugin which can be used to run the
> demo ? I was hoping to do a quick try this morning, I've tried Jetty9,
> older Jetty Maven plugins, dropped it into a standalone Tomcat 8, the demo
> fails to start for various reasons (no runt time weaving support, some
> classes are missing, etc)
>
> Cheers, Sergey
>
> On 25/01/17 05:31, Vjacheslav V. Borisov wrote:
>
>> This is example project
>> https://github.com/slavb18/testjavadoc
>>
>> 2017-01-24 16:28 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>>
>> Sure, I see what you mean, I did not think of it at a time.
>>> If you could set up a Maven test project where a javadocs jar is on the
>>> classpath then it will be easier for me to prioritize and experiment with
>>> the parser code, otherwise a creating a dedicated CXF test module will
>>> take
>>> time.
>>>
>>> Cheers, Sergey
>>>
>>>
>>> On 24/01/17 07:06, Vjacheslav V. Borisov wrote:
>>>
>>> No, I am talking about different (may be found impossible by author)
>>>> realisation of javadoc parsing
>>>> Since it is regular jar, and packaged as dependency, its contents
>>>> accesible
>>>> as regular classpath resource.
>>>> Point.class.getResource("Point.html") - e.g. this is working, can get
>>>> javadoc of class
>>>>
>>>> 2017-01-23 16:49 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>>>>
>>>> Hi
>>>>
>>>>>
>>>>> Freeman did it for a java2wadl, where JavaDocs info gets collected
>>>>> during
>>>>> the build time, but at the runtime JavaDocs are only visible from the
>>>>> dedicated jar.
>>>>> I do not know how would one load a javadocs jar without knowing the
>>>>> full
>>>>> Jar name, perhaps it can be done based on some convention...
>>>>>
>>>>> Sergey
>>>>>
>>>>>
>>>>> On 22/01/17 16:21, Vjacheslav V. Borisov wrote:
>>>>>
>>>>> Hi!
>>>>>
>>>>>>
>>>>>> I have configured javadoc using this config:
>>>>>>
>>>>>> <bean id="swagger2Serializers"
>>>>>> class="org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers">
>>>>>> <property name="javaDocPath"
>>>>>> value="WEB-INF/lib/bankaccounting-api-1.0-SNAPSHOT-javadoc.jar"/>
>>>>>> </bean>
>>>>>> <bean id="swagger2Feature"
>>>>>> class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
>>>>>> <property name="swagger2Serializers"
>>>>>> ref="swagger2Serializers"/>
>>>>>>
>>>>>> But this jar is regular war dependency lib, is there possibility to
>>>>>> configure javadoc using regular classpath, not referencing actual jar
>>>>>> version?
>>>>>>
>>>>>> 2017-01-17 17:08 GMT+04:00 Francesco Chicchiriccò <
>>>>>> ilgrosso@apache.org
>>>>>>
>>>>>>> :
>>>>>>>
>>>>>>
>>>>>>
>>>>>> The DefaultSwagger2Serializers class requires a JavadocProvider in
>>>>>> order
>>>>>>
>>>>>>> to be able to extract info from Javadocs; use one the methods [1] to
>>>>>>> configure.
>>>>>>>
>>>>>>> HTH
>>>>>>> Regards.
>>>>>>>
>>>>>>> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
>>>>>>> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
>>>>>>> DefaultSwagger2Serializers.java#L198-L217
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>> Sergey Beryozkin
>>>>>
>>>>> Talend Community Coders
>>>>> http://coders.talend.com/
>>>>>
>>>>>
>>>>>
>>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>>>
>>>
>>
>
Re: swagger2feature do not see javadocs ?
Posted by Sergey Beryozkin <sb...@gmail.com>.
Thanks for preparing it,
Can you please add a Jetty or Tomcat plugin which can be used to run the
demo ? I was hoping to do a quick try this morning, I've tried Jetty9,
older Jetty Maven plugins, dropped it into a standalone Tomcat 8, the
demo fails to start for various reasons (no runt time weaving support,
some classes are missing, etc)
Cheers, Sergey
On 25/01/17 05:31, Vjacheslav V. Borisov wrote:
> This is example project
> https://github.com/slavb18/testjavadoc
>
> 2017-01-24 16:28 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>
>> Sure, I see what you mean, I did not think of it at a time.
>> If you could set up a Maven test project where a javadocs jar is on the
>> classpath then it will be easier for me to prioritize and experiment with
>> the parser code, otherwise a creating a dedicated CXF test module will take
>> time.
>>
>> Cheers, Sergey
>>
>>
>> On 24/01/17 07:06, Vjacheslav V. Borisov wrote:
>>
>>> No, I am talking about different (may be found impossible by author)
>>> realisation of javadoc parsing
>>> Since it is regular jar, and packaged as dependency, its contents
>>> accesible
>>> as regular classpath resource.
>>> Point.class.getResource("Point.html") - e.g. this is working, can get
>>> javadoc of class
>>>
>>> 2017-01-23 16:49 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>>>
>>> Hi
>>>>
>>>> Freeman did it for a java2wadl, where JavaDocs info gets collected during
>>>> the build time, but at the runtime JavaDocs are only visible from the
>>>> dedicated jar.
>>>> I do not know how would one load a javadocs jar without knowing the full
>>>> Jar name, perhaps it can be done based on some convention...
>>>>
>>>> Sergey
>>>>
>>>>
>>>> On 22/01/17 16:21, Vjacheslav V. Borisov wrote:
>>>>
>>>> Hi!
>>>>>
>>>>> I have configured javadoc using this config:
>>>>>
>>>>> <bean id="swagger2Serializers"
>>>>> class="org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers">
>>>>> <property name="javaDocPath"
>>>>> value="WEB-INF/lib/bankaccounting-api-1.0-SNAPSHOT-javadoc.jar"/>
>>>>> </bean>
>>>>> <bean id="swagger2Feature"
>>>>> class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
>>>>> <property name="swagger2Serializers" ref="swagger2Serializers"/>
>>>>>
>>>>> But this jar is regular war dependency lib, is there possibility to
>>>>> configure javadoc using regular classpath, not referencing actual jar
>>>>> version?
>>>>>
>>>>> 2017-01-17 17:08 GMT+04:00 Francesco Chicchiricc� <ilgrosso@apache.org
>>>>>> :
>>>>>
>>>>>
>>>>> The DefaultSwagger2Serializers class requires a JavadocProvider in order
>>>>>> to be able to extract info from Javadocs; use one the methods [1] to
>>>>>> configure.
>>>>>>
>>>>>> HTH
>>>>>> Regards.
>>>>>>
>>>>>> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
>>>>>> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
>>>>>> DefaultSwagger2Serializers.java#L198-L217
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>
Re: swagger2feature do not see javadocs ?
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
This is example project
https://github.com/slavb18/testjavadoc
2017-01-24 16:28 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
> Sure, I see what you mean, I did not think of it at a time.
> If you could set up a Maven test project where a javadocs jar is on the
> classpath then it will be easier for me to prioritize and experiment with
> the parser code, otherwise a creating a dedicated CXF test module will take
> time.
>
> Cheers, Sergey
>
>
> On 24/01/17 07:06, Vjacheslav V. Borisov wrote:
>
>> No, I am talking about different (may be found impossible by author)
>> realisation of javadoc parsing
>> Since it is regular jar, and packaged as dependency, its contents
>> accesible
>> as regular classpath resource.
>> Point.class.getResource("Point.html") - e.g. this is working, can get
>> javadoc of class
>>
>> 2017-01-23 16:49 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>>
>> Hi
>>>
>>> Freeman did it for a java2wadl, where JavaDocs info gets collected during
>>> the build time, but at the runtime JavaDocs are only visible from the
>>> dedicated jar.
>>> I do not know how would one load a javadocs jar without knowing the full
>>> Jar name, perhaps it can be done based on some convention...
>>>
>>> Sergey
>>>
>>>
>>> On 22/01/17 16:21, Vjacheslav V. Borisov wrote:
>>>
>>> Hi!
>>>>
>>>> I have configured javadoc using this config:
>>>>
>>>> <bean id="swagger2Serializers"
>>>> class="org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers">
>>>> <property name="javaDocPath"
>>>> value="WEB-INF/lib/bankaccounting-api-1.0-SNAPSHOT-javadoc.jar"/>
>>>> </bean>
>>>> <bean id="swagger2Feature"
>>>> class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
>>>> <property name="swagger2Serializers" ref="swagger2Serializers"/>
>>>>
>>>> But this jar is regular war dependency lib, is there possibility to
>>>> configure javadoc using regular classpath, not referencing actual jar
>>>> version?
>>>>
>>>> 2017-01-17 17:08 GMT+04:00 Francesco Chicchiriccò <ilgrosso@apache.org
>>>> >:
>>>>
>>>>
>>>> The DefaultSwagger2Serializers class requires a JavadocProvider in order
>>>>> to be able to extract info from Javadocs; use one the methods [1] to
>>>>> configure.
>>>>>
>>>>> HTH
>>>>> Regards.
>>>>>
>>>>> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
>>>>> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
>>>>> DefaultSwagger2Serializers.java#L198-L217
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>>>
>>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
Re: swagger2feature do not see javadocs ?
Posted by Sergey Beryozkin <sb...@gmail.com>.
Sure, I see what you mean, I did not think of it at a time.
If you could set up a Maven test project where a javadocs jar is on the
classpath then it will be easier for me to prioritize and experiment
with the parser code, otherwise a creating a dedicated CXF test module
will take time.
Cheers, Sergey
On 24/01/17 07:06, Vjacheslav V. Borisov wrote:
> No, I am talking about different (may be found impossible by author)
> realisation of javadoc parsing
> Since it is regular jar, and packaged as dependency, its contents accesible
> as regular classpath resource.
> Point.class.getResource("Point.html") - e.g. this is working, can get
> javadoc of class
>
> 2017-01-23 16:49 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>
>> Hi
>>
>> Freeman did it for a java2wadl, where JavaDocs info gets collected during
>> the build time, but at the runtime JavaDocs are only visible from the
>> dedicated jar.
>> I do not know how would one load a javadocs jar without knowing the full
>> Jar name, perhaps it can be done based on some convention...
>>
>> Sergey
>>
>>
>> On 22/01/17 16:21, Vjacheslav V. Borisov wrote:
>>
>>> Hi!
>>>
>>> I have configured javadoc using this config:
>>>
>>> <bean id="swagger2Serializers"
>>> class="org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers">
>>> <property name="javaDocPath"
>>> value="WEB-INF/lib/bankaccounting-api-1.0-SNAPSHOT-javadoc.jar"/>
>>> </bean>
>>> <bean id="swagger2Feature"
>>> class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
>>> <property name="swagger2Serializers" ref="swagger2Serializers"/>
>>>
>>> But this jar is regular war dependency lib, is there possibility to
>>> configure javadoc using regular classpath, not referencing actual jar
>>> version?
>>>
>>> 2017-01-17 17:08 GMT+04:00 Francesco Chicchiricc� <il...@apache.org>:
>>>
>>>
>>>> The DefaultSwagger2Serializers class requires a JavadocProvider in order
>>>> to be able to extract info from Javadocs; use one the methods [1] to
>>>> configure.
>>>>
>>>> HTH
>>>> Regards.
>>>>
>>>> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
>>>> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
>>>> DefaultSwagger2Serializers.java#L198-L217
>>>>
>>>>
>>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: swagger2feature do not see javadocs ?
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
No, I am talking about different (may be found impossible by author)
realisation of javadoc parsing
Since it is regular jar, and packaged as dependency, its contents accesible
as regular classpath resource.
Point.class.getResource("Point.html") - e.g. this is working, can get
javadoc of class
2017-01-23 16:49 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
> Hi
>
> Freeman did it for a java2wadl, where JavaDocs info gets collected during
> the build time, but at the runtime JavaDocs are only visible from the
> dedicated jar.
> I do not know how would one load a javadocs jar without knowing the full
> Jar name, perhaps it can be done based on some convention...
>
> Sergey
>
>
> On 22/01/17 16:21, Vjacheslav V. Borisov wrote:
>
>> Hi!
>>
>> I have configured javadoc using this config:
>>
>> <bean id="swagger2Serializers"
>> class="org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers">
>> <property name="javaDocPath"
>> value="WEB-INF/lib/bankaccounting-api-1.0-SNAPSHOT-javadoc.jar"/>
>> </bean>
>> <bean id="swagger2Feature"
>> class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
>> <property name="swagger2Serializers" ref="swagger2Serializers"/>
>>
>> But this jar is regular war dependency lib, is there possibility to
>> configure javadoc using regular classpath, not referencing actual jar
>> version?
>>
>> 2017-01-17 17:08 GMT+04:00 Francesco Chicchiriccò <il...@apache.org>:
>>
>>
>>> The DefaultSwagger2Serializers class requires a JavadocProvider in order
>>> to be able to extract info from Javadocs; use one the methods [1] to
>>> configure.
>>>
>>> HTH
>>> Regards.
>>>
>>> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
>>> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
>>> DefaultSwagger2Serializers.java#L198-L217
>>>
>>>
>>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
Re: swagger2feature do not see javadocs ?
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
Freeman did it for a java2wadl, where JavaDocs info gets collected
during the build time, but at the runtime JavaDocs are only visible from
the dedicated jar.
I do not know how would one load a javadocs jar without knowing the full
Jar name, perhaps it can be done based on some convention...
Sergey
On 22/01/17 16:21, Vjacheslav V. Borisov wrote:
> Hi!
>
> I have configured javadoc using this config:
>
> <bean id="swagger2Serializers"
> class="org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers">
> <property name="javaDocPath"
> value="WEB-INF/lib/bankaccounting-api-1.0-SNAPSHOT-javadoc.jar"/>
> </bean>
> <bean id="swagger2Feature"
> class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
> <property name="swagger2Serializers" ref="swagger2Serializers"/>
>
> But this jar is regular war dependency lib, is there possibility to
> configure javadoc using regular classpath, not referencing actual jar
> version?
>
> 2017-01-17 17:08 GMT+04:00 Francesco Chicchiricc� <il...@apache.org>:
>
>>
>> The DefaultSwagger2Serializers class requires a JavadocProvider in order
>> to be able to extract info from Javadocs; use one the methods [1] to
>> configure.
>>
>> HTH
>> Regards.
>>
>> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
>> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
>> DefaultSwagger2Serializers.java#L198-L217
>>
>>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: swagger2feature do not see javadocs ?
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
Hi!
I have configured javadoc using this config:
<bean id="swagger2Serializers"
class="org.apache.cxf.jaxrs.swagger.DefaultSwagger2Serializers">
<property name="javaDocPath"
value="WEB-INF/lib/bankaccounting-api-1.0-SNAPSHOT-javadoc.jar"/>
</bean>
<bean id="swagger2Feature"
class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
<property name="swagger2Serializers" ref="swagger2Serializers"/>
But this jar is regular war dependency lib, is there possibility to
configure javadoc using regular classpath, not referencing actual jar
version?
2017-01-17 17:08 GMT+04:00 Francesco Chicchiriccò <il...@apache.org>:
>
> The DefaultSwagger2Serializers class requires a JavadocProvider in order
> to be able to extract info from Javadocs; use one the methods [1] to
> configure.
>
> HTH
> Regards.
>
> [1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/
> description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
> DefaultSwagger2Serializers.java#L198-L217
>
>
Re: swagger2feature do not see javadocs ?
Posted by Francesco Chicchiriccò <il...@apache.org>.
On 17-jan-17, at 13:44, Vjacheslav V. Borisov slavb18@gmail.com wrote:
> Hi!
>
> Playing with
> https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot
>
> Added Javadoc to method sayHello
>
> /**
> * sayHello doc
> * @param a the a param
> * @return
> */
> public String sayHello(String a) {
> return "Hello2 " + a + ", Welcome to CXF RS Spring Boot World!!!";
> }
>
> And do not see this documentation in swagger.json / api-docs
>
> Is javadoc parsing not implemented in swagger.json generation, or i am
> missing some switch?
The DefaultSwagger2Serializers class requires a JavadocProvider in order to be able to extract info from Javadocs; use one the methods [1] to configure.
HTH
Regards.
[1] https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java#L198-L217
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/