Before finishing this chapter, we will go through how to create documentation for the serverless API we've built so far.
On the API Gateway console, select the deployment stage that you're interested in generating documentation for. In the following example, I chose the production environment. Then, click on the Export tab and click on the Export as Swagger section:
Swagger is an implementation of the OpenAPI, which is a standard defined by the Linux Foundation on how to describe and define APIs. This definition is called the OpenAPI specification document.
You can save the document in either a JSON or YAML file. Then, navigate to https://editor.swagger.io/ and paste the content on the website editor, it will be compiled and an HTML page will be generated as follows: