Skip to content

npellegrin/serverless-swagger-ui

Repository files navigation

Serverless Swagger UI

Purpose

This is project inspired by a blog post from Hendrik Hagen but intend to use Python instead of Node.js

Check out the original Node.js project on https://github.com/Eraszz/tecracer-blog-projects/tree/main/api-gateway-swagger-ui

How to run this sample

  1. Generate a Flask zip for AWS Lambda layer by executing the generate-requirements.sh script.
  2. Export AWS credentials from your favorite AWS account
  3. Run terraform apply

The deployment will generate an Amazon API Gateway api into the Paris (eu-west-3) region, with a demo route /orders and the associated documentation at /api-docs route.

Related projects

This project is intended to be a minimal-dependecies standalone example of a Python serverless swagger UI served by Amazon Api Gateway. This project also bundles modified versions of other open-source projects, in particular:

  • Flask Swagger UI proposing a blueprint to run Swagger UI in Flask
  • awsgi exposing a way to run Flask apps directly in Amazon Api Gateway with AWS Lambda proxy integration

Mixed content disclaimer

The content inside the src/api-docs/layer/dist directory are binaries from the Swagger UI project and duplicated here as example. You may upgrade or downgrade you Swagger UI version according to your need by downloading the appropriate version and copying inside the directory.

License disclaimer

This project is provided under the Apache 2.0 license, just like Swagger UI does. This project is freely inspired by copyrighted work by Hendrik Hagen and other work under the MIT license, like the Flask Swagger UI license or awsgi license

Please ensure all these licenses and copyrights are compatible with your company's policy before using this software.

About

Serverless Swagger UI for Amazon API Gateway, written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published