Serverless Plugin Api Docs

homepage icon https://github.com/8select/serverless-plugin-api-docs

Tracked

NPM Downloads Last Month
0
Issues
2
Stars
7
Forks
2
Watchers
7

Repo README Contents:

serverless-plugin-api-docs

serverless

Work with SWAGGER documentation for Serverless v1.0 projects.

A serverless plugin to automatically create a lambda function which returns the swagger-ui HTML based on the given swagger spec JSON file GET /docs => swagger-ui

Install

using NPM

npm install --save-dev 8select/serverless-plugin-api-docs

Add the plugin to your serverless.yml file:

plugins:
  - serverless-plugin-api-docs

Prerequisites

Download and host swagger-ui library files e.g. with S3

Configuration

custom:
  documentation:
    path: 'path/to/swagger.json' # REQUIRED
    contentUrl: '<URL_TO_YOUR_HOSTED_SWAGGER_UI_FILES>' # REQUIRED
    name: '<your_custom_lambda_function_name>' # OPTIONAL - default = 'docs'