initial commit
Todas las comprobaciones han sido exitosas
continuous-integration/drone Build is passing
Todas las comprobaciones han sido exitosas
continuous-integration/drone Build is passing
Signed-off-by: ale <ale@manalejandro.com>
Este commit está contenido en:
25
back/lib/swagger.js
Archivo normal
25
back/lib/swagger.js
Archivo normal
@@ -0,0 +1,25 @@
|
||||
module.exports = app => {
|
||||
const swaggerJsdoc = require('swagger-jsdoc'),
|
||||
swaggerUi = require('swagger-ui-express'),
|
||||
options = {
|
||||
swaggerOptions: {
|
||||
withCredentials: false
|
||||
},
|
||||
swaggerDefinition: {
|
||||
restapi: '3.1.0',
|
||||
info: {
|
||||
title: 'Fediblock Instance API',
|
||||
version: '1.0.0',
|
||||
description: '#Fediblock Instance REST API',
|
||||
},
|
||||
servers: [
|
||||
{
|
||||
url: 'http://localhost:3000',
|
||||
},
|
||||
],
|
||||
},
|
||||
apis: ['**/apiswagger.js'],
|
||||
},
|
||||
specs = swaggerJsdoc(options)
|
||||
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(specs, { explorer: false }))
|
||||
}
|
||||
Referencia en una nueva incidencia
Block a user