#1911 Fixed Missing model name in response section
This commit is contained in:
2
dist/css/print.css
vendored
2
dist/css/print.css
vendored
@@ -82,7 +82,7 @@
|
|||||||
.swagger-section pre .vhdl .attribute,
|
.swagger-section pre .vhdl .attribute,
|
||||||
.swagger-section pre .clojure .attribute,
|
.swagger-section pre .clojure .attribute,
|
||||||
.swagger-section pre .coffeescript .property {
|
.swagger-section pre .coffeescript .property {
|
||||||
color: #8888ff;
|
color: #88F;
|
||||||
}
|
}
|
||||||
.swagger-section pre .keyword,
|
.swagger-section pre .keyword,
|
||||||
.swagger-section pre .id,
|
.swagger-section pre .id,
|
||||||
|
|||||||
2
dist/css/screen.css
vendored
2
dist/css/screen.css
vendored
@@ -82,7 +82,7 @@
|
|||||||
.swagger-section pre .vhdl .attribute,
|
.swagger-section pre .vhdl .attribute,
|
||||||
.swagger-section pre .clojure .attribute,
|
.swagger-section pre .clojure .attribute,
|
||||||
.swagger-section pre .coffeescript .property {
|
.swagger-section pre .coffeescript .property {
|
||||||
color: #8888ff;
|
color: #88F;
|
||||||
}
|
}
|
||||||
.swagger-section pre .keyword,
|
.swagger-section pre .keyword,
|
||||||
.swagger-section pre .id,
|
.swagger-section pre .id,
|
||||||
|
|||||||
14
dist/swagger-ui.js
vendored
14
dist/swagger-ui.js
vendored
@@ -25453,7 +25453,8 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
code: code,
|
code: code,
|
||||||
message: value.description,
|
message: value.description,
|
||||||
responseModel: schema,
|
responseModel: schema,
|
||||||
headers: value.headers
|
headers: value.headers,
|
||||||
|
schema: schemaObj
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26987,6 +26988,10 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
return ' ' + attr.name + '="' + attr.value + '"';
|
return ' ' + attr.name + '="' + attr.value + '"';
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
|
if (!name) {
|
||||||
|
return getErrorMessage('Node name is not provided');
|
||||||
|
}
|
||||||
|
|
||||||
str = [
|
str = [
|
||||||
'<', name,
|
'<', name,
|
||||||
attributes,
|
attributes,
|
||||||
@@ -27153,8 +27158,9 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
return '<!-- Infinite loop $ref:' + name + ' -->';
|
return '<!-- Infinite loop $ref:' + name + ' -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getErrorMessage () {
|
function getErrorMessage (details) {
|
||||||
return '<!-- invalid XML -->';
|
details = details ? ': ' + details : '';
|
||||||
|
return '<!-- invalid XML' + details + ' -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
function createSchemaXML (name, definition, models, config) {
|
function createSchemaXML (name, definition, models, config) {
|
||||||
@@ -27429,7 +27435,7 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({
|
|||||||
if (this.router.api.models.hasOwnProperty(this.model.responseModel)) {
|
if (this.router.api.models.hasOwnProperty(this.model.responseModel)) {
|
||||||
var responseModel = {
|
var responseModel = {
|
||||||
sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 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,
|
sampleXML: this.model.isXML ? SwaggerUi.partials.signature.createXMLSample(this.model.schema, value.models) : false,
|
||||||
isParam: false,
|
isParam: false,
|
||||||
signature: SwaggerUi.partials.signature.getModelSignature(this.model.responseModel, value, this.router.api.models),
|
signature: SwaggerUi.partials.signature.getModelSignature(this.model.responseModel, value, this.router.api.models),
|
||||||
defaultRendering: this.model.defaultRendering
|
defaultRendering: this.model.defaultRendering
|
||||||
|
|||||||
8
dist/swagger-ui.min.js
vendored
8
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -82,7 +82,7 @@
|
|||||||
.swagger-section pre .vhdl .attribute,
|
.swagger-section pre .vhdl .attribute,
|
||||||
.swagger-section pre .clojure .attribute,
|
.swagger-section pre .clojure .attribute,
|
||||||
.swagger-section pre .coffeescript .property {
|
.swagger-section pre .coffeescript .property {
|
||||||
color: #8888ff;
|
color: #88F;
|
||||||
}
|
}
|
||||||
.swagger-section pre .keyword,
|
.swagger-section pre .keyword,
|
||||||
.swagger-section pre .id,
|
.swagger-section pre .id,
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
.swagger-section pre .vhdl .attribute,
|
.swagger-section pre .vhdl .attribute,
|
||||||
.swagger-section pre .clojure .attribute,
|
.swagger-section pre .clojure .attribute,
|
||||||
.swagger-section pre .coffeescript .property {
|
.swagger-section pre .coffeescript .property {
|
||||||
color: #8888ff;
|
color: #88F;
|
||||||
}
|
}
|
||||||
.swagger-section pre .keyword,
|
.swagger-section pre .keyword,
|
||||||
.swagger-section pre .id,
|
.swagger-section pre .id,
|
||||||
|
|||||||
@@ -156,7 +156,8 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
code: code,
|
code: code,
|
||||||
message: value.description,
|
message: value.description,
|
||||||
responseModel: schema,
|
responseModel: schema,
|
||||||
headers: value.headers
|
headers: value.headers,
|
||||||
|
schema: schemaObj
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({
|
|||||||
if (this.router.api.models.hasOwnProperty(this.model.responseModel)) {
|
if (this.router.api.models.hasOwnProperty(this.model.responseModel)) {
|
||||||
var responseModel = {
|
var responseModel = {
|
||||||
sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 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,
|
sampleXML: this.model.isXML ? SwaggerUi.partials.signature.createXMLSample(this.model.schema, value.models) : false,
|
||||||
isParam: false,
|
isParam: false,
|
||||||
signature: SwaggerUi.partials.signature.getModelSignature(this.model.responseModel, value, this.router.api.models),
|
signature: SwaggerUi.partials.signature.getModelSignature(this.model.responseModel, value, this.router.api.models),
|
||||||
defaultRendering: this.model.defaultRendering
|
defaultRendering: this.model.defaultRendering
|
||||||
|
|||||||
@@ -661,6 +661,10 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
return ' ' + attr.name + '="' + attr.value + '"';
|
return ' ' + attr.name + '="' + attr.value + '"';
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
|
if (!name) {
|
||||||
|
return getErrorMessage('Node name is not provided');
|
||||||
|
}
|
||||||
|
|
||||||
str = [
|
str = [
|
||||||
'<', name,
|
'<', name,
|
||||||
attributes,
|
attributes,
|
||||||
@@ -827,8 +831,9 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
return '<!-- Infinite loop $ref:' + name + ' -->';
|
return '<!-- Infinite loop $ref:' + name + ' -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getErrorMessage () {
|
function getErrorMessage (details) {
|
||||||
return '<!-- invalid XML -->';
|
details = details ? ': ' + details : '';
|
||||||
|
return '<!-- invalid XML' + details + ' -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
function createSchemaXML (name, definition, models, config) {
|
function createSchemaXML (name, definition, models, config) {
|
||||||
|
|||||||
Reference in New Issue
Block a user