cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <ilgro...@apache.org>
Subject Re: WADL and Swagger
Date Thu, 21 Jan 2016 12:28:41 GMT
On 21/01/2016 13:13, Sergey Beryozkin wrote:
> Hi
>
> wadl-to-java generates a Java code and optionally converts WADL docs 
> into JavaDocs too - and with the latest improvements to the feature 
> done by Francesco the source (+ docs) will be converted into Swagger 
> JSON, without necessarily adding Swagger annotations...
>
> As a side note, if the only reason you'd like to do Swagger is to get 
> some UI then note WADLGenerator can be configured with and XSLT source 
> reference, an XSLT conversion (like the one done in Syncope :-)) can 
> make a great difference :-)

FYI, this is the result of such XSLT transformation, starting from the 
CXF-generated, Javadocs-enabled, WADL

http://syncope.apache.org/rest/2.0/index.html

and this is the Swagger obtained from the same source, generated by 
Swagger2Feature:

http://syncopecore2-tirasa.rhcloud.com/swagger/

(deployed on OpenShift with free gears and not always available...)

Regards.

> On 21/01/16 12:05, Francesco Chicchiriccò wrote:
>> On 21/01/2016 11:34, Gary Gregory wrote:
>>> Hi All:
>>>
>>> I see that CXF includes supports for both WADL [1] and Swagger [2]. 
>>> Is to
>>> possible to programatically use CXF to convert a WADL file to a Swagger
>>> file? Perhaps by first parsing WADL to some CXF internal format and 
>>> then
>>> back out to Swagger?
>>
>> Hi Gary,
>> don't know about WADL -> internal (maybe Sergey), but the internal ->
>> Swagger part is what actually performed by [3] as triggered by [4]
>> (references shown for 3.1.X).
>>
>> Regards.
>>
>>> [1] 
>>> https://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-WADLfirstDevelopment

>>>
>>>
>>> [2] https://cxf.apache.org/docs/swagger2feature.html
>> [3] 
>> https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java

>>
>>
>> [4] 
>> https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java#L92

>>

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC, CXF committer
http://home.apache.org/~ilgrosso/


Mime
View raw message