Merge branch 'master' of https://github.com/mikexliu/swagger-ui into mikexliu-master
This commit is contained in:
@@ -9,7 +9,7 @@ Handlebars.registerHelper('sanitize', function(html) {
|
|||||||
|
|
||||||
Handlebars.registerHelper('renderTextParam', function(param) {
|
Handlebars.registerHelper('renderTextParam', function(param) {
|
||||||
var result, type = 'text', idAtt = '';
|
var result, type = 'text', idAtt = '';
|
||||||
var paramType = param.type || param.schema.type || '';
|
var paramType = param.type ? param.type : (param.schema ? (param.schema.type ? param.schema.type : '') : '');
|
||||||
var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple;
|
var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple;
|
||||||
var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;
|
var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;
|
||||||
|
|
||||||
@@ -75,4 +75,4 @@ Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
|
|||||||
default:
|
default:
|
||||||
return options.inverse(this);
|
return options.inverse(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user