@@ -25343,7 +25343,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
25343
25343
// Note: copied from CoffeeScript compiled file
25344
25344
// TODO: redactor
25345
25345
render: function() {
25346
- var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value;
25346
+ var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value, produces, isXML ;
25347
25347
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
25348
25348
if (!isMethodSubmissionSupported) {
25349
25349
this.model.isReadOnly = true;
@@ -25422,6 +25422,13 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
25422
25422
this.model.responseMessages = [];
25423
25423
}
25424
25424
signatureModel = null;
25425
+ produces = this.model.produces;
25426
+ isXML = produces.filter(function (val) {
25427
+ if (val.indexOf('xml') > -1) {
25428
+ return true;
25429
+ }
25430
+ }).length;
25431
+
25425
25432
if (this.model.successResponse) {
25426
25433
successResponse = this.model.successResponse;
25427
25434
for (key in successResponse) {
@@ -25433,6 +25440,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
25433
25440
signatureModel = {
25434
25441
sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2),
25435
25442
isParam: false,
25443
+ sampleXML: isXML ? SwaggerUi.partials.signature.createXMLSample(value.definition, value.models) : false,
25436
25444
signature: SwaggerUi.partials.signature.getModelSignature(value.name, value.definition, value.models, value.modelPropertyMacro)
25437
25445
};
25438
25446
}
@@ -27031,7 +27039,7 @@ SwaggerUi.partials.signature = (function () {
27031
27039
function createXMLSample (definition, models) {
27032
27040
var prolog = '<?xml version="1.0"?>';
27033
27041
27034
- return prolog + createSchemaXML('', definition, models);
27042
+ return formatXml( prolog + createSchemaXML('', definition, models) );
27035
27043
}
27036
27044
27037
27045
return {
0 commit comments