WADL and Swagger United in Apache CXF
A Talend Community Coders post brought to you by: Sergey Beryozkin
Who could've thought that Swagger and WADL can be real friends ?
Both Swagger and WADL are about describing REST APIs and while the former has a definite momentum, the latter has proved to be very capable and helpful to JAX-RS users.
The important thing is that we have users who submit WADL documents to the runtime or build time code generators which is all working fine. We also have Swagger users who use cool Swagger features and being happy with a nice UI being generated. And WADL users, while being happy with WADL (which IMHO is indeed a very capable language for describing schema rich XML but with some extensions - even JSON - services) would like to use Swagger to introspect the code generated by WADL processors and have a nice API UI.
So my colleague Andrei and Francesco, Apache Syncope maestro, have driven the work about enhancing a WADL generator to set WADL documentation fragments as Java Docs in the generated sources and then having CXF Swagger features being very smart about enhancing Swagger JSON payloads with these Java Docs, with Francesco doing some magic there. I should also mention Andriy Redko doing some work earlier on directly with Swagger for it to better support JAX-RS annotations and initiating the CXF Swagger project and Aki Yoshida doing a lot of Swagger2 work next.
So here you go, WADL and Swagger United in Apache CXF.
IMHO this project has been a perfect example of the power of the Open Source collaboration with the contributors from different teams working effectively on this project.
More about Sergey Beryozkin: a committer of Apache CXF and Apache Aries.
Sergey has focused on working with web services and XML technologies for over twenty years. He is currently the leader of the Apache CXF JAX-RS and OAuth2 implementation projects. As a software architect in the Application Integration Division of Talend, he focuses on Talend Service Factory and works with Talend colleagues on creating better support for REST.
Die beliebtesten Ressourcen
Sie sind sich immer noch nicht ganz sicher, wo Sie beginnen sollen?