26 lines
644 B
JavaScript
26 lines
644 B
JavaScript
const swaggerAutogen = require('swagger-autogen')({openapi: '3.0.0'});
|
|
|
|
const doc = {
|
|
info: {
|
|
title: 'GAMBLE!',
|
|
description: 'Gambling API'
|
|
},
|
|
host: 'localhost:25566',
|
|
components: {
|
|
securitySchemes:{
|
|
bearerAuth: {
|
|
type: 'http',
|
|
scheme: 'bearer'
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
const outputFile = './swagger.json';
|
|
const routes = ['./gambling.js'];
|
|
|
|
/* NOTE: If you are using the express Router, you must pass in the 'routes' only the
|
|
root file where the route starts, such as index.js, app.js, routes.js, etc ... */
|
|
|
|
swaggerAutogen(outputFile, routes, doc);
|