#1911 Fixed Missing model name in response section

This commit is contained in:
Anna Bodnia
2016-01-25 18:53:50 +02:00
parent 01085edac1
commit 4f4cddd491
9 changed files with 28 additions and 16 deletions

View File

@@ -661,6 +661,10 @@ SwaggerUi.partials.signature = (function () {
return ' ' + attr.name + '="' + attr.value + '"';
}).join('');
if (!name) {
return getErrorMessage('Node name is not provided');
}
str = [
'<', name,
attributes,
@@ -827,8 +831,9 @@ SwaggerUi.partials.signature = (function () {
return '<!-- Infinite loop $ref:' + name + ' -->';
}
function getErrorMessage () {
return '<!-- invalid XML -->';
function getErrorMessage (details) {
details = details ? ': ' + details : '';
return '<!-- invalid XML' + details + ' -->';
}
function createSchemaXML (name, definition, models, config) {