#1248 createXMLSample added array
This commit is contained in:
22
dist/swagger-ui.js
vendored
22
dist/swagger-ui.js
vendored
@@ -26817,11 +26817,11 @@ SwaggerUi.partials.signature = (function () {
|
||||
|
||||
attributes = attrs.map(function (attr) {
|
||||
return ' ' + attr.name + '="' + attr.value + '"';
|
||||
});
|
||||
}).join('');
|
||||
|
||||
str = [
|
||||
'<', name,
|
||||
attributes.join(''),
|
||||
attributes,
|
||||
'>',
|
||||
value,
|
||||
'</', name, '>'
|
||||
@@ -26868,6 +26868,22 @@ SwaggerUi.partials.signature = (function () {
|
||||
};
|
||||
};
|
||||
|
||||
var createArray = function (name, items, xml) {
|
||||
var value;
|
||||
|
||||
if (!items) { return ''; }
|
||||
|
||||
value = createXMLSample(name, items) + createXMLSample(name, items);
|
||||
|
||||
xml = xml || {};
|
||||
|
||||
if (xml.wrapped) {
|
||||
value = wrapTag(name, value);
|
||||
}
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
var createXMLSample = function (name, definition) {
|
||||
var primitivesMap = {
|
||||
'string': {
|
||||
@@ -26904,6 +26920,8 @@ SwaggerUi.partials.signature = (function () {
|
||||
value = primitivesMap[type][format] || primitivesMap[type].default;
|
||||
|
||||
return wrapTag(name, value, attributes);
|
||||
} else if (type === 'array') {
|
||||
return createArray(name, definition.items, xml);
|
||||
}
|
||||
|
||||
return '';
|
||||
|
||||
2
dist/swagger-ui.min.js
vendored
2
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user