Skip to main content

Generate SAM template and AWS OpenAPI extended docs

Project description

Build Status Coverage Status Python Version

oai-sam is a script generating a SAM template together with OpenAPI documentation including AWS OpenAPI extensions from an OpenAPI/swagger documentation.

Simply provide your OpenApi/Swagger as an input and then use SAM CLI to deploy a working AWS ApiGateway.

Install

pip install oai-sam

Usage

Generate

oai-sam -f <OPENAPI_DOCS> -u <BACKEND_URL> -c <CORS_ORIGINS>

e.g:

oai-sam -f https://petstore.swagger.io/v2/swagger.json -u http://petstore.swagger.io/v2 -c "*"

Deploy AWS ApiGateway

  • Install SAM CLI
  • sam package --template-file out/apigateway.yaml --s3-bucket <SAM_BUCKET> --output-file packaged.yaml (See sam package for more options)
  • sam deploy --template-file packaged.yaml (See sam deploy for more options)

Show list of available arguments

oai-sam --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oai-sam-0.0.1.tar.gz (14.5 kB view details)

Uploaded Source

File details

Details for the file oai-sam-0.0.1.tar.gz.

File metadata

  • Download URL: oai-sam-0.0.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for oai-sam-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1b59eb04745bf20e92e7c02ad19a375a892cdaeeb77d0b9aef21a08dfc41a213
MD5 a38250906bb52c4e79d41ea944f4db7b
BLAKE2b-256 b000656a130c208c0942593ab8aa84f7a511639e7d8e26e5d8308542d696d229

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page