diff --git a/swagger-ui.js b/swagger-ui.js
index 39d96c25f30..2fc19babaa0 100644
--- a/swagger-ui.js
+++ b/swagger-ui.js
@@ -26110,7 +26110,7 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
var signatureModel = {
sampleJSON: SwaggerUi.partials.signature.createParameterJSONSample(modelType, modelDefinitions),
- sampleXML: isXML ? SwaggerUi.partials.signature.createXMLSample(schema, modelDefinitions) : false,
+ sampleXML: isXML ? SwaggerUi.partials.signature.createXMLSample(schema, modelDefinitions, true) : false,
isParam: true,
signature: SwaggerUi.partials.signature.getParameterModelSignature(modelType, modelDefinitions),
defaultRendering: this.model.defaultRendering
@@ -26980,6 +26980,7 @@ SwaggerUi.partials.signature = (function () {
var name = descriptor.name;
var definition = descriptor.definition;
var models = descriptor.models;
+ var isParam = descriptor.isParam;
var serializedProperties;
var attrs = [];
var properties = definition.properties;
@@ -26996,6 +26997,8 @@ SwaggerUi.partials.signature = (function () {
properties = properties || {};
serializedProperties = _.map(properties, function (prop, key) {
+ if (isParam && prop.readOnly) { return ''; }
+
return createSchemaXML(key, prop, models);
}).join('');
@@ -27010,10 +27013,10 @@ SwaggerUi.partials.signature = (function () {
return '';
}
- function createSchemaXML (name, definition, models) {
+ function createSchemaXML (name, definition, models, isParam) {
var $ref = definition.$ref;
var descriptor = _.isString($ref) ? getDescriptorByRef($ref, models)
- : getDescriptor(name, definition, models);
+ : getDescriptor(name, definition, models, isParam);
if (!descriptor) {
return getErrorMessage();
@@ -27029,7 +27032,7 @@ SwaggerUi.partials.signature = (function () {
}
}
- function Descriptor (name, type, definition, models) {
+ function Descriptor (name, type, definition, models, isParam) {
if (arguments.length < 4) {
throw new Error();
}
@@ -27038,6 +27041,7 @@ SwaggerUi.partials.signature = (function () {
this.definition = definition;
this.models = models;
this.type = type;
+ this.isParam = isParam;
}
function getDescriptorByRef($ref, models) {
@@ -27053,7 +27057,7 @@ SwaggerUi.partials.signature = (function () {
return new Descriptor (name, type, model.definition, models);
}
- function getDescriptor (name, definition, models){
+ function getDescriptor (name, definition, models, isParam){
var type = definition.type || 'object';
var xml = definition.xml || {};
@@ -27063,13 +27067,13 @@ SwaggerUi.partials.signature = (function () {
name = getName(name, xml);
- return new Descriptor(name, type, definition, models);
+ return new Descriptor(name, type, definition, models,isParam);
}
- function createXMLSample (definition, models) {
+ function createXMLSample (definition, models, isParam) {
var prolog = '';
- return formatXml(prolog + createSchemaXML('', definition, models));
+ return formatXml(prolog + createSchemaXML('', definition, models, isParam));
}
return {
diff --git a/swagger-ui.min.js b/swagger-ui.min.js
index e76363b39e6..3ffcf528489 100644
--- a/swagger-ui.min.js
+++ b/swagger-ui.min.js
@@ -1,11 +1,11 @@
(function(){function e(){e.history=e.history||[],e.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])}this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"\n
\n"},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'\n\n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,u=this.escapeExpression,l='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:if(e[0].length>0){var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1})}break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),r=n+"_content";Docs.expandOperation($("#"+r)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?($.bbq.pushState("#/",2),Docs.collapseEndpointListForResource(e)):($.bbq.pushState("#/"+e,2),Docs.expandEndpointListForResource(e))},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/