initial
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const swaggerAutogen = require('swagger-autogen')();
|
||||
const swaggerAutogen = require('swagger-autogen')({ openapi: '3.0.0' });
|
||||
const config = require('config');
|
||||
|
||||
const doc = {
|
||||
@ -7,7 +7,27 @@ const doc = {
|
||||
description: config.get('app.description'),
|
||||
version: config.get('app.version')
|
||||
},
|
||||
host: config.get('server.host_swagger') + ':' + config.get('server.port'),
|
||||
servers: [
|
||||
{
|
||||
url: config.get('server.host_swagger'),
|
||||
description: 'Environtment ' + config.get('app.env')
|
||||
},
|
||||
],
|
||||
components: {
|
||||
schemas: {
|
||||
product: {
|
||||
$code: "123456",
|
||||
$name: "Product name",
|
||||
$description: "Product description",
|
||||
$status: "Y",
|
||||
},
|
||||
branch: {
|
||||
$code: "123456",
|
||||
$name: "Branch name",
|
||||
$status: "Y",
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
const outputFile = './swagger.json';
|
||||
|
||||
Reference in New Issue
Block a user