hapi-swagger
Advanced tools
Comparing version 4.3.0 to 4.3.1
@@ -204,2 +204,4 @@ 'use strict'; | ||
settings.jsonPath = appendQueryString(settings.jsonPath, 'tags', request.query.tags); | ||
} else { | ||
settings.jsonPath = appendQueryString(settings.jsonPath, null, null); | ||
} | ||
@@ -232,5 +234,9 @@ | ||
let urlObj = Url.parse(url); | ||
urlObj.query = Querystring.parse(qsName + '=' + qsValue); | ||
urlObj.search = '?' + encodeURIComponent(qsName) + '=' + encodeURIComponent(qsValue); | ||
if (qsName && qsValue) { | ||
urlObj.query = Querystring.parse(qsName + '=' + qsValue); | ||
urlObj.search = '?' + encodeURIComponent(qsName) + '=' + encodeURIComponent(qsValue); | ||
} else { | ||
urlObj.search = ''; | ||
} | ||
return urlObj.format(urlObj); | ||
}; |
@@ -178,2 +178,9 @@ 'use strict'; | ||
/* | ||
// add alternatives properties | ||
if (property.type === 'alternatives') { | ||
property = internals.parseAlternatives(property, joiObj, name, definitionCollection, type); | ||
} | ||
*/ | ||
// add file upload properties | ||
@@ -321,3 +328,27 @@ if (joiType === 'any' && Utilities.hasJoiMeta(joiObj)) { | ||
/** | ||
* parse alternatives property | ||
* | ||
* @param {Object} property | ||
* @param {Object} joiObj | ||
* @param {String} name | ||
* @param {Object} definitionCollection | ||
* @param {String} type | ||
* @return {Object} | ||
*/ | ||
/* | ||
internals.parseAlternatives = function (property, joiObj, name, definitionCollection, type) { | ||
if (Hoek.reach(joiObj, '_inner.matches')){ | ||
let altArray = joiObj._inner.matches.map( (obj) => { | ||
return properties.parseProperty(name, obj.schema, definitionCollection, type); | ||
}); | ||
property = altArray[0]; | ||
//property['x-hapi-alternatives'] = [Hoek.clone(altArray)]; | ||
} | ||
return property; | ||
}; | ||
*/ | ||
/** | ||
@@ -324,0 +355,0 @@ * parse any property |
{ | ||
"name": "hapi-swagger", | ||
"description": "A swagger documentation UI generator plugin for hapi", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"author": "Glenn Jones", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -613,4 +613,2 @@ # hapi-swagger | ||
If you are considering sending a pull request please add tests for the functionality you add or change. | ||
@@ -617,0 +615,0 @@ |
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
3707726
82642
98
42966
624