#1248 createXMLSample prettified xml display
This commit is contained in:
1
dist/css/print.css
vendored
1
dist/css/print.css
vendored
@@ -365,6 +365,7 @@
|
|||||||
}
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
|
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
|
||||||
display: block;
|
display: block;
|
||||||
|
min-width: 230px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
1
dist/css/screen.css
vendored
1
dist/css/screen.css
vendored
@@ -365,6 +365,7 @@
|
|||||||
}
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
|
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
|
||||||
display: block;
|
display: block;
|
||||||
|
min-width: 230px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
12
dist/swagger-ui.js
vendored
12
dist/swagger-ui.js
vendored
@@ -25343,7 +25343,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
// Note: copied from CoffeeScript compiled file
|
// Note: copied from CoffeeScript compiled file
|
||||||
// TODO: redactor
|
// TODO: redactor
|
||||||
render: function() {
|
render: function() {
|
||||||
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;
|
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;
|
||||||
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
|
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
|
||||||
if (!isMethodSubmissionSupported) {
|
if (!isMethodSubmissionSupported) {
|
||||||
this.model.isReadOnly = true;
|
this.model.isReadOnly = true;
|
||||||
@@ -25422,6 +25422,13 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
this.model.responseMessages = [];
|
this.model.responseMessages = [];
|
||||||
}
|
}
|
||||||
signatureModel = null;
|
signatureModel = null;
|
||||||
|
produces = this.model.produces;
|
||||||
|
isXML = produces.filter(function (val) {
|
||||||
|
if (val.indexOf('xml') > -1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}).length;
|
||||||
|
|
||||||
if (this.model.successResponse) {
|
if (this.model.successResponse) {
|
||||||
successResponse = this.model.successResponse;
|
successResponse = this.model.successResponse;
|
||||||
for (key in successResponse) {
|
for (key in successResponse) {
|
||||||
@@ -25433,6 +25440,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
signatureModel = {
|
signatureModel = {
|
||||||
sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2),
|
sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2),
|
||||||
isParam: false,
|
isParam: false,
|
||||||
|
sampleXML: isXML ? SwaggerUi.partials.signature.createXMLSample(value.definition, value.models) : false,
|
||||||
signature: SwaggerUi.partials.signature.getModelSignature(value.name, value.definition, value.models, value.modelPropertyMacro)
|
signature: SwaggerUi.partials.signature.getModelSignature(value.name, value.definition, value.models, value.modelPropertyMacro)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -27031,7 +27039,7 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
function createXMLSample (definition, models) {
|
function createXMLSample (definition, models) {
|
||||||
var prolog = '<?xml version="1.0"?>';
|
var prolog = '<?xml version="1.0"?>';
|
||||||
|
|
||||||
return prolog + createSchemaXML('', definition, models);
|
return formatXml(prolog + createSchemaXML('', definition, models));
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
18
dist/swagger-ui.min.js
vendored
18
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -365,6 +365,7 @@
|
|||||||
}
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
|
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
|
||||||
display: block;
|
display: block;
|
||||||
|
min-width: 230px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -365,6 +365,7 @@
|
|||||||
}
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
|
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
|
||||||
display: block;
|
display: block;
|
||||||
|
min-width: 230px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -835,7 +835,7 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
function createXMLSample (definition, models) {
|
function createXMLSample (definition, models) {
|
||||||
var prolog = '<?xml version="1.0"?>';
|
var prolog = '<?xml version="1.0"?>';
|
||||||
|
|
||||||
return prolog + createSchemaXML('', definition, models);
|
return formatXml(prolog + createSchemaXML('', definition, models));
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -254,6 +254,7 @@
|
|||||||
}
|
}
|
||||||
ul.signature-nav {
|
ul.signature-nav {
|
||||||
display: block;
|
display: block;
|
||||||
|
min-width: 230px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
li:last-child {
|
li:last-child {
|
||||||
|
|||||||
Reference in New Issue
Block a user