Enterprise Integration Zone is brought to you in partnership with:

As VP of Technology Evangelism at WSO2, Chris Haddad raises awareness of Platform as a Service, Cloud Architecture, Service Oriented Architecture, API Management, and Enterprise Integration. Prior to joining WSO2, Haddad’s experience includes building software development teams, contributing to open source, crafting technology roadmaps, leading Gartner research teams, and delivering Software as a Service and Web applications. Chris is a DZone MVB and is not an employee of DZone and has posted 107 posts at DZone. You can read more from them at their website. View Full User Profile

Swagger with WSO2 API Manager

06.09.2013
| 2592 views |
  • submit to reddit

APIs are often described in JSON, and XML Schema or XML-based client tooling doesn’t work.  Swagger enables developers to describe the API message, produce API schema documentations, and simplify connecting clients to APIs. The overarching goal of Swagger is to enable client and documentation systems to update at the same pace as the server. The documentation of methods, parameters and models are tightly integrated into the server code, allowing APIs to always stay in sync.  WSO2 API Manager now integrates Swagger code.  Swagger spans six distinct GitHub modules:

Swagger is a specification and complete framework available under an Apache 2.0 open source license.  Swagger includes six distinct modules:

Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Swagger Core defines Java annotations and logic to automatically generate a Swagger JSON description from a number of supported servers. This project also hosts the wiki, which defines the specification.

Swagger Codegen contains a template-driven engine to generate code in different languages by parsing your Swagger Resource Declaration.

Scalatra contains native support for Swagger inside the Scalatra micro web framework.

Swagger node.js provides automatically-generated Swagger JSON for node.js in the express framework.

Swagger Play 2 provides automatically-generated Swagger JSON for the Play! Framework

WSO2 API Manager 1.4 supports Swagger.  With Swagger integration, WSO2 API Manager 1.4 loads Swagger UI for each API and will display auto-generated documentation.  The API creator or API publisher can customize API parameters and documentation.

Swagger integration

Figure 1: Default Swagger UI in WSO2 API Store

The APICultur Store demonstrates Swagger integration in action.

To learn more about how to add documentation with Swagger, read the WSO2 API Manager documentation page.

Recommended Reading

API Branding

API and SOA Convergence

Promoting service re-use with APIs

API Policy and Governance

Published at DZone with permission of Chris Haddad, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)