Skip to content

Instantly share code, notes, and snippets.

View mspclaims's full-sized avatar

Acclaim mspclaims

View GitHub Profile
@acclaim-tech
acclaim-tech / handler.js
Created November 4, 2017 05:56
Expose swagger json from API Gateway lambda
module.exports.getDocs = function(event, context, callback) {
let options = {
swaggerDefinition: {
info: { // API informations (required)
title: 'API Gateway project', // Title (required)
version: '1.0.0', // Version (required)
description: 'Set of API endpoints exposed via API Gateway', // Description (optional)
},
host: 'localhost', // Host (optional)
basePath: '/', // Base path (optional),