OpenAPI (Swagger 2.0) Specification Integration

Overview

Starting with release 16.3, Avi Vantage includes support for the OpenAPI Specification (fka Swagger RESTful API Documentation Specification). It can be accessed via the Avi API Documentation link in the pull-down menu, as shown in the below screenshot.

Accessing Avi API documentation from the UI

Swagger UI Integration into Avi Controller

The Swagger UI is fully integrated into the Avi Controller. Admins can search from a list of API specifications via the search bar, as shown below.

Searching for pool

Displaying documentation for the Pool object

Once a resource is selected, the location of the specification file is shown on the top, to the right of the Select API pull-down menu. This permits one to download the specifications from the Avi Controller and thereafter use them with swagger tools like

  1. Swagger Editor: Interactive tool for developing and viewing Swagger specifications.
  2. Swagger Codegen: Generates Client SDKs in several languages.

Swagger API “Try it out” Feature

Swagger UI also has a built-in “try it out!” functionality to try the API right from the context of the API documentation. The feature requires basic authentication setting to be enabled on the Avi Controller.

The output provides

  1. Allowed query and body parameters
  2. Equivalent curl command for the API
  3. API response from the Controller

The following shows example of fetching all the pools via try it out!

Pool object documentation