Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate swagger documentation for aws-lambda python API?

I have an AWS-lambda based API, written in python. The data is in elastic search. The python code is basically an interface between the user and ES.

I need to add swagger documentation.

I can create the swagger.json file manually, but I would like to have some automated process, to be able to keep up with future changes.

Is there a library that would help me to somehow automatically generate the swagger documentation?

I was searching around, and I found multiple libraries for flask, but I'm not using flask

like image 459
eternal_student Avatar asked Oct 15 '20 18:10

eternal_student


People also ask

How do I create a Swagger API document?

Head over to Swagger Inspector, and insert the end point of the resource you want to have documented. You can then navigate to the right panel from the History section of Swagger Inspector, and click "Create API definition" to create the OAS definition.

Can Swagger documentation be used for AWS API gateway setup?

It is a fully managed platform which allows users to build, deploy and manage APIs at any scale. The important aspect of the Amazon API Gateway is that it supports the Swagger definition format for designing and building RESTful APIs, and as you know, SwaggerHub is all about the Swagger!


1 Answers

Steps to get swagger details from AWS API gateway :

  1. Go to API gateway
  2. Click on stage
  3. Select Stage which you need to get
  4. Select "Export" tab
  5. Choose required option like Export as Swagger

Swagger export images

like image 89
aviboy2006 Avatar answered Oct 08 '22 08:10

aviboy2006