CodeGenieApp / CodeGenieApp/serverless-express

Swagger ui is not loaded

Ouverte
#705 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
5.3k
Forks
676
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start by reproducing the API Gateway request using the lambda.js handler and the routes in server.js, including the static paths for api.json and swagger-ui-dist. Compare the working endpoint response with the Swagger UI request and identify the project-side change needed; done means the Swagger UI and its specification load through the deployed API Gateway URL.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
aws, express, javascript, node.js
Domaine
api, backend, cloud
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.