Merge pull request #1512 from channelgrabber/issue-1423
Issue #1423: $ref schema objects in Responses Definitions Object don't seem to be displayed correctly
This commit is contained in:
@@ -139,8 +139,8 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
schemaObj = this.model.responses[code].schema;
|
schemaObj = this.model.responses[code].schema;
|
||||||
if (schemaObj && schemaObj.$ref) {
|
if (schemaObj && schemaObj.$ref) {
|
||||||
schema = schemaObj.$ref;
|
schema = schemaObj.$ref;
|
||||||
if (schema.indexOf('#/definitions/') === 0) {
|
if (schema.indexOf('#/definitions/') !== -1) {
|
||||||
schema = schema.substring('#/definitions/'.length);
|
schema = schema.replace(/^.*#\/definitions\//, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.model.responseMessages.push({
|
this.model.responseMessages.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user