Over a million developers have joined DZone.

Swagger with WSO2 API Manager

DZone's Guide to

Swagger with WSO2 API Manager

· Integration Zone ·
Free Resource

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

Build and deploy API integrations 7x faster. Try the Cloud Elements 100% RESTful platform for 30 days free. Access your trial here.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}