Skip to content

Swagger ui is not loaded #705

Description

@jkpandianbsetec

Hello team,

Currently am using aws-serverless-express, but in latest npm its not working, so migrating the @codegenie/serverless-express npm with custom re route npm.

From api gateway url, normal end points are working fine, but swagger only not loading.

lambda.js
const app = require('./server')
const serverlessExpress = require('@codegenie/serverless-express')
exports.handler = serverlessExpress({ app })

server.js
var express = require('express');
var app = express();
var path = require('path');
app.use('/v1/mints/docs/api.json', express.static(path.join(__dirname, '/docs/mints-api-v1.json')));
const pathToSwaggerUi = require('swagger-ui-dist').absolutePath()
app.use('/v1/mints/docs/', express.static(pathToSwaggerUi))

module.exports = app

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions