Skip to content

Commit

Permalink
swagger-api#1248 createXMLSample handle prefix and names in xml
Browse files Browse the repository at this point in the history
  • Loading branch information
bodnia committed Jan 12, 2016
1 parent 955f00f commit 9d54773
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions swagger-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -26833,8 +26833,17 @@ SwaggerUi.partials.signature = (function () {
};
var type = definition.type;
var format = definition.format;
var xml = definition.xml || {};
var value;

if (xml.name) {
name = xml.name;
}

if (xml.prefix) {
name = xml.prefix + ':' + name;
}

if (_.keys(primitivesMap).indexOf(type) !== -1) {
if (type === 'string') {
value = format ? primitivesMap.string[format] : primitivesMap.string.default;
Expand Down
Loading

0 comments on commit 9d54773

Please sign in to comment.