Closed GustavoCinque closed 3 years ago
Hi.
I'm using dist, and my swagger is created as an pre code of an html page.
This is my configuration:
import path from 'path'; import swaggerJsdoc from 'swagger-jsdoc'; import swaggerUi from 'swagger-ui-express'; import { Express } from 'express' import swaggerDefinition from './docs/info' export default (app: Express): void => { const swaggerOptions = { swaggerDefinition, apis: [path.join(__dirname, '..', '..', '..', 'main', 'server.js'), path.join(__dirname, '..', '..', '..', 'main', 'routes', '*-route.js')] } const swaggerDocs = swaggerJsdoc(swaggerOptions); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocs)) }
My definitions isn't detailed yet:
export default { title: 'Email Service', description: 'Email service', termsOfService: '', contact: { name: '', url: '', email: '' }, license: { name: '', url: '' }, servers: [process.env.API || 'http://localhost:8080/api'], version: '0.0.1' }
Hi.
I'm using dist, and my swagger is created as an pre code of an html page.
This is my configuration:
My definitions isn't detailed yet: