New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hapi-swagger

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-swagger - npm Package Compare versions

Comparing version 0.1.14 to 0.2.0

bin/mock-routes.js

5

lib/index.js

@@ -79,2 +79,7 @@ var Hoek = require('hoek'),

exports.register.attributes = {
pkg: require('../package.json')
};
internals.docs = function(settings) {

@@ -81,0 +86,0 @@

4

package.json
{
"name": "hapi-swagger",
"description": "A swagger documentation UI generator plugin for hapi",
"version": "0.1.14",
"version": "0.2.0",
"author": "Glenn Jones",

@@ -33,4 +33,4 @@ "repository": {

"peerDependencies": {
"hapi": ">= 2.x < 6.x"
"hapi": ">= 2.x < 7.x"
}
}

@@ -24,7 +24,10 @@ # hapi-swagger

server.pack.require({'hapi-swagger': options}, function (err) {
if (!err && err !== null) {
server.pack.register({
plugin: require('hapi-swagger'),
options: swaggerOptions
}, function (err) {
if (err) {
server.log(['error'], 'Plugin "hapi-swagger" load error: ' + err)
}else{
server.log(['start'], 'swagger interface loaded')
server.log(['start'], 'Swagger interface loaded')
}

@@ -197,2 +200,21 @@ });

## Adding the plug-in earlier version HAPI (versions 2.x to 5.x)
How you load a plugin changed with version 6 of HAPI. This is the example code for load hapi-swagger with earlier version
var pack = require('../package'),
options = {
basePath: 'http://localhost:8000',
apiVersion: pack.version
};
server.pack.require({'hapi-swagger': options}, function (err) {
if (!err && err !== null) {
server.log(['error'], 'Plugin "hapi-swagger" load error: ' + err)
}else{
server.log(['start'], 'swagger interface loaded')
}
});
### Mocha test

@@ -223,1 +245,4 @@ The project has a small number integration and unit tests. To run the test within the project type the following command.

If you find any issue please file here on github and I will try and fix them.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc