#1901 Body parameter content type xml does not handle nested definition correctly
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,
|
||||||
|
|||||||
12
dist/swagger-ui.js
vendored
12
dist/swagger-ui.js
vendored
@@ -27162,7 +27162,7 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
var output, index;
|
var output, index;
|
||||||
config = config || {};
|
config = config || {};
|
||||||
config.modelsToIgnore = config.modelsToIgnore || [];
|
config.modelsToIgnore = config.modelsToIgnore || [];
|
||||||
var descriptor = _.isString($ref) ? getDescriptorByRef($ref, models, config)
|
var descriptor = _.isString($ref) ? getDescriptorByRef($ref, name, models, config)
|
||||||
: getDescriptor(name, definition, models, config);
|
: getDescriptor(name, definition, models, config);
|
||||||
|
|
||||||
if (!descriptor) {
|
if (!descriptor) {
|
||||||
@@ -27197,20 +27197,21 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
|
|
||||||
this.config = config || {};
|
this.config = config || {};
|
||||||
this.config.modelsToIgnore = this.config.modelsToIgnore || [];
|
this.config.modelsToIgnore = this.config.modelsToIgnore || [];
|
||||||
this.name = name;
|
this.name = getName(name, definition.xml);
|
||||||
this.definition = definition;
|
this.definition = definition;
|
||||||
this.models = models;
|
this.models = models;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDescriptorByRef($ref, models, config) {
|
function getDescriptorByRef($ref, name, models, config) {
|
||||||
var modelType = simpleRef($ref);
|
var modelType = simpleRef($ref);
|
||||||
var model = models[modelType] || {};
|
var model = models[modelType] || {};
|
||||||
var name = model.name || modelType;
|
|
||||||
var type = model.type || 'object';
|
var type = model.type || 'object';
|
||||||
|
name = name || model.name;
|
||||||
|
|
||||||
if (config.modelsToIgnore.indexOf($ref) > -1) {
|
if (config.modelsToIgnore.indexOf($ref) > -1) {
|
||||||
type = 'loop';
|
type = 'loop';
|
||||||
|
name = modelType;
|
||||||
} else {
|
} else {
|
||||||
config.modelsToIgnore.push($ref);
|
config.modelsToIgnore.push($ref);
|
||||||
}
|
}
|
||||||
@@ -27224,14 +27225,11 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
|
|
||||||
function getDescriptor (name, definition, models, config){
|
function getDescriptor (name, definition, models, config){
|
||||||
var type = definition.type || 'object';
|
var type = definition.type || 'object';
|
||||||
var xml = definition.xml || {};
|
|
||||||
|
|
||||||
if (!definition) {
|
if (!definition) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = getName(name, xml);
|
|
||||||
|
|
||||||
return new Descriptor(name, type, definition, models, config);
|
return new Descriptor(name, type, definition, models, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
dist/swagger-ui.min.js
vendored
6
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,
|
||||||
|
|||||||
@@ -836,7 +836,7 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
var output, index;
|
var output, index;
|
||||||
config = config || {};
|
config = config || {};
|
||||||
config.modelsToIgnore = config.modelsToIgnore || [];
|
config.modelsToIgnore = config.modelsToIgnore || [];
|
||||||
var descriptor = _.isString($ref) ? getDescriptorByRef($ref, models, config)
|
var descriptor = _.isString($ref) ? getDescriptorByRef($ref, name, models, config)
|
||||||
: getDescriptor(name, definition, models, config);
|
: getDescriptor(name, definition, models, config);
|
||||||
|
|
||||||
if (!descriptor) {
|
if (!descriptor) {
|
||||||
@@ -871,20 +871,21 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
|
|
||||||
this.config = config || {};
|
this.config = config || {};
|
||||||
this.config.modelsToIgnore = this.config.modelsToIgnore || [];
|
this.config.modelsToIgnore = this.config.modelsToIgnore || [];
|
||||||
this.name = name;
|
this.name = getName(name, definition.xml);
|
||||||
this.definition = definition;
|
this.definition = definition;
|
||||||
this.models = models;
|
this.models = models;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDescriptorByRef($ref, models, config) {
|
function getDescriptorByRef($ref, name, models, config) {
|
||||||
var modelType = simpleRef($ref);
|
var modelType = simpleRef($ref);
|
||||||
var model = models[modelType] || {};
|
var model = models[modelType] || {};
|
||||||
var name = model.name || modelType;
|
|
||||||
var type = model.type || 'object';
|
var type = model.type || 'object';
|
||||||
|
name = name || model.name;
|
||||||
|
|
||||||
if (config.modelsToIgnore.indexOf($ref) > -1) {
|
if (config.modelsToIgnore.indexOf($ref) > -1) {
|
||||||
type = 'loop';
|
type = 'loop';
|
||||||
|
name = modelType;
|
||||||
} else {
|
} else {
|
||||||
config.modelsToIgnore.push($ref);
|
config.modelsToIgnore.push($ref);
|
||||||
}
|
}
|
||||||
@@ -898,14 +899,11 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
|
|
||||||
function getDescriptor (name, definition, models, config){
|
function getDescriptor (name, definition, models, config){
|
||||||
var type = definition.type || 'object';
|
var type = definition.type || 'object';
|
||||||
var xml = definition.xml || {};
|
|
||||||
|
|
||||||
if (!definition) {
|
if (!definition) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = getName(name, xml);
|
|
||||||
|
|
||||||
return new Descriptor(name, type, definition, models, config);
|
return new Descriptor(name, type, definition, models, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user