hapi-swagger
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -367,3 +367,3 @@ var Hoek = require('hoek'), | ||
if (param.describe) { | ||
// version >= 2.x of Joi | ||
// version >= 2.x/3.x of Joi | ||
var describe = param.describe(); | ||
@@ -395,2 +395,3 @@ | ||
// version >= 2.x of Joi | ||
if (property.type === 'object' && param._children) { | ||
@@ -403,2 +404,11 @@ property.type = internals.validatorsToModelName( | ||
// version >= 3.x of Joi | ||
if (property.type === 'object' && param._inner) { | ||
property.type = internals.validatorsToModelName( | ||
param._settings.className || param._settings.typeName || property.description, | ||
param._inner, | ||
models); | ||
} | ||
if (property.type === 'array') { | ||
@@ -405,0 +415,0 @@ property.minItems = internals.getArgByName(describe.rules, 'min'); |
{ | ||
"name": "hapi-swagger", | ||
"description": "A swagger documentation UI generator plugin for hapi", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"author": "Glenn Jones", | ||
@@ -21,5 +21,5 @@ "repository": { | ||
"handlebars": "1.3.x", | ||
"boom": "2.1.x", | ||
"hoek": "1.4.x", | ||
"joi": "2.7.x" | ||
"boom": "2.4.x", | ||
"hoek": "2.0.x", | ||
"joi": "3.0.x" | ||
}, | ||
@@ -34,4 +34,4 @@ "devDependencies": { | ||
"peerDependencies": { | ||
"hapi": "2.x" | ||
"hapi": "4.x" | ||
} | ||
} |
@@ -47,3 +47,3 @@ # hapi-swagger | ||
path: { | ||
username: hapi.types.String() | ||
username: joi.number() | ||
.required() | ||
@@ -118,3 +118,3 @@ .description('the id for the todo item'), | ||
var responseModel = hapi.types.object({ | ||
equals: hapi.types.number(), | ||
equals: joi.number(), | ||
}).options({ | ||
@@ -132,7 +132,7 @@ className: 'Result' | ||
path: { | ||
a: hapi.types.Number() | ||
a: joi.number() | ||
.required() | ||
.description('the first number'), | ||
b: hapi.types.Number() | ||
b: joi.number() | ||
.required() | ||
@@ -165,7 +165,7 @@ .description('the second number') | ||
path: { | ||
a: hapi.types.Number() | ||
a: joi.number() | ||
.required() | ||
.description('the first number'), | ||
b: hapi.types.Number() | ||
b: joi.number() | ||
.required() | ||
@@ -172,0 +172,0 @@ .description('the second number') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
510346
9648
+ Addedasync@0.8.0(transitive)
+ Addedboom@2.4.2(transitive)
+ Addedcatbox@2.2.1(transitive)
+ Addedcatbox-memory@1.1.2(transitive)
+ Addedhapi@4.1.4(transitive)
+ Addedhoek@2.0.0(transitive)
+ Addedjoi@3.0.03.1.0(transitive)
+ Addedtopo@1.1.0(transitive)
- Removedboom@2.1.02.10.1(transitive)
- Removedcatbox@1.2.0(transitive)
- Removedhapi@2.6.0(transitive)
- Removedhoek@1.4.11.5.22.16.3(transitive)
- Removedjoi@2.7.0(transitive)
Updatedboom@2.4.x
Updatedhoek@2.0.x
Updatedjoi@3.0.x