don't override title and type if they are already defined
This commit is contained in:
8
dist/swagger-ui.js
vendored
8
dist/swagger-ui.js
vendored
@@ -31451,12 +31451,16 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
$.extend(true, param.schema, this.model.definitions[param.type]);
|
$.extend(true, param.schema, this.model.definitions[param.type]);
|
||||||
param.schema.definitions = this.model.definitions;
|
param.schema.definitions = this.model.definitions;
|
||||||
// This is required for JsonEditor to display the root properly
|
// This is required for JsonEditor to display the root properly
|
||||||
param.schema.type = 'object';
|
if(!param.schema.type){
|
||||||
|
param.schema.type = 'object';
|
||||||
|
}
|
||||||
// This is the title that will be used by JsonEditor for the root
|
// This is the title that will be used by JsonEditor for the root
|
||||||
// Since we already display the parameter's name in the Parameter column
|
// Since we already display the parameter's name in the Parameter column
|
||||||
// We set this to space, we can't set it to null or space otherwise JsonEditor
|
// We set this to space, we can't set it to null or space otherwise JsonEditor
|
||||||
// will replace it with the text "root" which won't look good on screen
|
// will replace it with the text "root" which won't look good on screen
|
||||||
param.schema.title = ' ';
|
if(!param.schema.title){
|
||||||
|
param.schema.title = ' ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
dist/swagger-ui.min.js
vendored
2
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -245,12 +245,16 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
$.extend(true, param.schema, this.model.definitions[param.type]);
|
$.extend(true, param.schema, this.model.definitions[param.type]);
|
||||||
param.schema.definitions = this.model.definitions;
|
param.schema.definitions = this.model.definitions;
|
||||||
// This is required for JsonEditor to display the root properly
|
// This is required for JsonEditor to display the root properly
|
||||||
param.schema.type = 'object';
|
if(!param.schema.type){
|
||||||
|
param.schema.type = 'object';
|
||||||
|
}
|
||||||
// This is the title that will be used by JsonEditor for the root
|
// This is the title that will be used by JsonEditor for the root
|
||||||
// Since we already display the parameter's name in the Parameter column
|
// Since we already display the parameter's name in the Parameter column
|
||||||
// We set this to space, we can't set it to null or space otherwise JsonEditor
|
// We set this to space, we can't set it to null or space otherwise JsonEditor
|
||||||
// will replace it with the text "root" which won't look good on screen
|
// will replace it with the text "root" which won't look good on screen
|
||||||
param.schema.title = ' ';
|
if(!param.schema.title){
|
||||||
|
param.schema.title = ' ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user