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.
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.
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
- Swagger Editor: Interactive tool for developing and viewing Swagger specifications.
- 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
- Allowed query and body parameters
- Equivalent
curl
command for the API - API response from the Controller
The following shows example of fetching all the pools via try it out!