Permalink
Browse files

(flavor) swagger v2.3.0

  • Loading branch information...
devinivy committed Jan 21, 2019
1 parent 5243ac2 commit 05d3b4eae98984b820ea1123def907560d447a5e
Showing with 33 additions and 2 deletions.
  1. +5 −2 package.json
  2. +3 −0 server/manifest.js
  3. +25 −0 server/plugins/swagger.js
@@ -4,7 +4,7 @@
"main": "lib/index.js",
"scripts": {
"start": "node server",
"test": "lab -a code -L",
"test": "lab -a code -I 'core,__core-js_shared__' -L",
"lint": "eslint ."
},
"dependencies": {
@@ -21,8 +21,11 @@
"eslint-plugin-hapi": "4.x.x",
"glue": "5.x.x",
"hapi": "18.x.x",
"hapi-swagger": "9.x.x",
"hpal-debug": "1.x.x",
"inert": "5.x.x",
"lab": "18.x.x",
"toys": "2.x.x"
"toys": "2.x.x",
"vision": "5.x.x"
}
}
@@ -33,6 +33,9 @@ module.exports = new Confidence.Store({
plugin: '../lib', // Main plugin
options: {}
},
{
plugin: './plugins/swagger'
},
{
plugin: {
$filter: { $env: 'NODE_ENV' },
@@ -0,0 +1,25 @@
'use strict';

const Inert = require('inert');
const Vision = require('vision');
const HapiSwagger = require('hapi-swagger');
const Package = require('../../package.json');

module.exports = {
name: 'app-swagger',
async register(server) {

await server.register([
Inert,
Vision,
{
plugin: HapiSwagger,
options: {
info: {
version: Package.version
}
}
}
]);
}
};

0 comments on commit 05d3b4e

Please sign in to comment.