rebuilt
This commit is contained in:
12
dist/swagger-ui.js
vendored
12
dist/swagger-ui.js
vendored
@@ -25533,7 +25533,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
router: this.router
|
||||
});
|
||||
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
|
||||
this.showSnippet();
|
||||
ref4 = this.model.parameters;
|
||||
for (p = 0, len3 = ref4.length; p < len3; p++) {
|
||||
param = ref4[p];
|
||||
@@ -25542,8 +25541,12 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
ref5 = this.model.responseMessages;
|
||||
for (q = 0, len4 = ref5.length; q < len4; q++) {
|
||||
statusCode = ref5[q];
|
||||
statusCode.isXML = isXML;
|
||||
statusCode.isJSON = isJSON;
|
||||
this.addStatusCode(statusCode);
|
||||
}
|
||||
|
||||
this.showSnippet();
|
||||
return this;
|
||||
},
|
||||
|
||||
@@ -27021,7 +27024,6 @@ SwaggerUi.partials.signature = (function () {
|
||||
if (!items) { return getErrorMessage(); }
|
||||
|
||||
value = createSchemaXML(name, items, models);
|
||||
value += value;
|
||||
|
||||
xml = xml || {};
|
||||
|
||||
@@ -27369,13 +27371,15 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
render: function(){
|
||||
var value = this.router.api.models[this.model.responseModel];
|
||||
$(this.el).html(Handlebars.templates.status_code(this.model));
|
||||
|
||||
if (this.router.api.models.hasOwnProperty(this.model.responseModel)) {
|
||||
var responseModel = {
|
||||
sampleJSON: JSON.stringify(this.router.api.models[this.model.responseModel].createJSONSample(), null, 2),
|
||||
sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2),
|
||||
sampleXML: this.model.isXML ? SwaggerUi.partials.signature.createXMLSample(value.definition, value.models) : false,
|
||||
isParam: false,
|
||||
signature: this.router.api.models[this.model.responseModel].getMockSignature(),
|
||||
signature: SwaggerUi.partials.signature.getModelSignature(this.model.responseModel, value, this.router.api.models),
|
||||
defaultRendering: this.model.defaultRendering
|
||||
};
|
||||
|
||||
|
||||
4
dist/swagger-ui.min.js
vendored
4
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -236,7 +236,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
router: this.router
|
||||
});
|
||||
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
|
||||
this.showSnippet();
|
||||
ref4 = this.model.parameters;
|
||||
for (p = 0, len3 = ref4.length; p < len3; p++) {
|
||||
param = ref4[p];
|
||||
@@ -245,8 +244,12 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
ref5 = this.model.responseMessages;
|
||||
for (q = 0, len4 = ref5.length; q < len4; q++) {
|
||||
statusCode = ref5[q];
|
||||
statusCode.isXML = isXML;
|
||||
statusCode.isJSON = isJSON;
|
||||
this.addStatusCode(statusCode);
|
||||
}
|
||||
|
||||
this.showSnippet();
|
||||
return this;
|
||||
},
|
||||
|
||||
|
||||
@@ -7,13 +7,15 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
render: function(){
|
||||
var value = this.router.api.models[this.model.responseModel];
|
||||
$(this.el).html(Handlebars.templates.status_code(this.model));
|
||||
|
||||
if (this.router.api.models.hasOwnProperty(this.model.responseModel)) {
|
||||
var responseModel = {
|
||||
sampleJSON: JSON.stringify(this.router.api.models[this.model.responseModel].createJSONSample(), null, 2),
|
||||
sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2),
|
||||
sampleXML: this.model.isXML ? SwaggerUi.partials.signature.createXMLSample(value.definition, value.models) : false,
|
||||
isParam: false,
|
||||
signature: this.router.api.models[this.model.responseModel].getMockSignature(),
|
||||
signature: SwaggerUi.partials.signature.getModelSignature(this.model.responseModel, value, this.router.api.models),
|
||||
defaultRendering: this.model.defaultRendering
|
||||
};
|
||||
|
||||
|
||||
@@ -721,7 +721,6 @@ SwaggerUi.partials.signature = (function () {
|
||||
if (!items) { return getErrorMessage(); }
|
||||
|
||||
value = createSchemaXML(name, items, models);
|
||||
value += value;
|
||||
|
||||
xml = xml || {};
|
||||
|
||||
|
||||
@@ -177,8 +177,8 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
});
|
||||
|
||||
describe('array', function () {
|
||||
it('returns tag <tagname>string</tagname><tagname>string</tagname> when passing string items', function () {
|
||||
var expected = '<tagname>string</tagname><tagname>string</tagname>';
|
||||
it('returns tag <tagname>string</tagname> when passing string items', function () {
|
||||
var expected = '<tagname>string</tagname>';
|
||||
var name = 'tagname';
|
||||
var definition = {
|
||||
type: 'array',
|
||||
@@ -190,8 +190,8 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||
});
|
||||
|
||||
it('returns tag <animal>string</animal><animal>string</animal> when passing string items with name', function () {
|
||||
var expected = '<animal>string</animal><animal>string</animal>';
|
||||
it('returns tag <animal>string</animal> when passing string items with name', function () {
|
||||
var expected = '<animal>string</animal>';
|
||||
var name = 'animals';
|
||||
var definition = {
|
||||
type: 'array',
|
||||
@@ -206,8 +206,8 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||
});
|
||||
|
||||
it('returns tag <animals><animal>string</animal><animal>string</animal></animals> when passing string items with name', function () {
|
||||
var expected = '<animals><animal>string</animal><animal>string</animal></animals>';
|
||||
it('returns tag <animals><animal>string</animal></animals> when passing string items with name', function () {
|
||||
var expected = '<animals><animal>string</animal></animals>';
|
||||
var name = 'animals';
|
||||
var definition = {
|
||||
type: 'array',
|
||||
@@ -225,8 +225,8 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||
});
|
||||
|
||||
it('returns tag <aliens><animal>string</animal><animal>string</animal></aliens> when passing string items with name and {wrapped: true}', function () {
|
||||
var expected = '<aliens><animal>string</animal><animal>string</animal></aliens>';
|
||||
it('returns tag <aliens><animal>string</animal></aliens> when passing string items with name and {wrapped: true}', function () {
|
||||
var expected = '<aliens><animal>string</animal></aliens>';
|
||||
var name = 'animals';
|
||||
var definition = {
|
||||
type: 'array',
|
||||
@@ -246,7 +246,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
});
|
||||
|
||||
it('return correct nested wrapped array', function () {
|
||||
var expected = '<aliens><cat>string</cat><cat>string</cat><cat>string</cat><cat>string</cat></aliens>';
|
||||
var expected = '<aliens><cat>string</cat></aliens>';
|
||||
var name = 'animals';
|
||||
var definition = {
|
||||
type: 'array',
|
||||
@@ -270,8 +270,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
|
||||
it('return correct nested wrapped array', function () {
|
||||
var expected = '<aliens>' +
|
||||
'<cats><cat>string</cat><cat>string</cat></cats>' +
|
||||
'<cats><cat>string</cat><cat>string</cat></cats>' +
|
||||
'<cats><cat>string</cat></cats>' +
|
||||
'</aliens>';
|
||||
var name = 'animals';
|
||||
var definition = {
|
||||
@@ -326,7 +325,6 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
|
||||
it('returns object with integer property and array property', function () {
|
||||
var expected = '<animals>' +
|
||||
'<aliens>string</aliens>' +
|
||||
'<aliens>string</aliens>' +
|
||||
'<cat>1</cat>' +
|
||||
'</animals>';
|
||||
@@ -354,7 +352,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
|
||||
it('returns object with integer property and array property', function () {
|
||||
var expected = '<animals>' +
|
||||
'<aliens><alien>string</alien><alien>string</alien></aliens>' +
|
||||
'<aliens><alien>string</alien></aliens>' +
|
||||
'<cat>1</cat>' +
|
||||
'</animals>';
|
||||
var name = 'animals';
|
||||
@@ -474,7 +472,6 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
|
||||
it('returns array of Tags wrapped into Tags', function () {
|
||||
var expected = '<Tags>' +
|
||||
'<Tag><id>1</id><name>string</name></Tag>' +
|
||||
'<Tag><id>1</id><name>string</name></Tag>' +
|
||||
'</Tags>';
|
||||
var schema = {
|
||||
@@ -501,11 +498,9 @@ describe('SwaggerUi.partials.signature tests', function () {
|
||||
'<name>doggie</name>' +
|
||||
'<photoUrl>' +
|
||||
'<photoUrl>string</photoUrl>' +
|
||||
'<photoUrl>string</photoUrl>' +
|
||||
'</photoUrl>' +
|
||||
'<tag>' +
|
||||
'<Tag><id>1</id><name>string</name></Tag>' +
|
||||
'<Tag><id>1</id><name>string</name></Tag>' +
|
||||
'</tag>' +
|
||||
'<status>available</status>' +
|
||||
'</Pet>';
|
||||
|
||||
Reference in New Issue
Block a user