Ctrl K
ComunidadGuías…

api/index.js

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
const swaggerJsDoc = require("swagger-jsdoc");
const swaggerUi = require("swagger-ui-express");

const swaggerOptions = require("./swaggerOptions")

const swaggerDocs = swaggerJsDoc(swaggerOptions);

const useSwagger = (app, swaggerPath = '/api-docs') => {
  app.use(swaggerPath, swaggerUi.serve, swaggerUi.setup(swaggerDocs))
}

module.exports = useSwagger