mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-25 10:03:45 +03:00
fix: incorrect detected schema title for deeply inherited schemas
This commit is contained in:
parent
b0e660eca0
commit
7d7b4e3fb8
|
@ -187,6 +187,7 @@ export class OpenAPIParser {
|
|||
...schema,
|
||||
allOf: undefined,
|
||||
parentRefs: [],
|
||||
title: schema.title || (isNamedDefinition($ref) ? JsonPointer.baseName($ref) : undefined),
|
||||
};
|
||||
|
||||
// avoid mutating inner objects
|
||||
|
@ -263,11 +264,6 @@ export class OpenAPIParser {
|
|||
}
|
||||
}
|
||||
|
||||
// name of definition or title on top level
|
||||
if (schema.title === undefined && isNamedDefinition($ref)) {
|
||||
receiver.title = JsonPointer.baseName($ref);
|
||||
}
|
||||
|
||||
return receiver;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ Object {
|
|||
"type": "string",
|
||||
},
|
||||
},
|
||||
"title": undefined,
|
||||
},
|
||||
Object {
|
||||
"allOf": undefined,
|
||||
|
@ -38,6 +39,7 @@ Object {
|
|||
"type": "string",
|
||||
},
|
||||
},
|
||||
"title": undefined,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -59,6 +61,7 @@ Object {
|
|||
"type": "string",
|
||||
},
|
||||
},
|
||||
"title": undefined,
|
||||
},
|
||||
Object {
|
||||
"allOf": undefined,
|
||||
|
@ -76,6 +79,7 @@ Object {
|
|||
"type": "string",
|
||||
},
|
||||
},
|
||||
"title": undefined,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user