Open API Initiative Spec (Swagger) with Hugo - PetStore Example

This is an example of using Open API Spec (formerly known as Swagger Spec) with Hugo to generate documentation from your spec files.

The example uses Hugo Shortcodes to embed the Open API Spec in the page, the source code for the shortcode is hosted on GitHub here.

To embed the API documentation below you just need to include the following shortcode:

{{< oai-spec url="" api_key="special-key" >}}

There are just two options:

The resulting output will look like the page below.