Swagger UI Integration for Confluence

Swagger UI is one of the most popular tools for generating interactive documentation from your OpenAPI document. Swagger UI generates an interactive API console for users to quickly learn about your API and experiment with requests. Additionally, Swagger UI (which is an actively managed project with an Apache 2.0 license) supports the latest version of the OpenAPI spec (3.x) and integrates with other Swagger tooling.

 

Getting Started

  1. Edit Confluence page, insert Swagger UI Integration for Confluence macro

 2. Input the URL of your OpenAPI specification and other configurations

If you hosted your Open API definition on a server, you can input the URL points to the OpenAPI Document URL. For example, you can use this link: http://petstore.swagger.io/v2/swagger.json

If you don’t host your Open API definition on a server, you can paste your Open API definition to macro content as below:

After saving the page, your Open API definition will be rendered to your Confluence page:

Get familiar with Swagger UI through the Petstore demo

To get a better understanding of Swagger UI, let’s explore the Swagger Petstore example. In the Petstore example, the site is generated using Swagger UI.