mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-25 18:13:44 +03:00
use copy of referenced schema in dereference
This commit is contained in:
parent
cd900926bd
commit
406a9ddb21
|
@ -86,6 +86,7 @@ export class BaseComponent {
|
|||
let resolved = this.schemaMgr.byPointer(schema.$ref);
|
||||
let baseName = JsonPointer.baseName(schema.$ref);
|
||||
// if resolved schema doesn't have title use name from ref
|
||||
resolved = Object.assign({}, resolved);
|
||||
resolved.title = resolved.title || baseName;
|
||||
resolved._pointer = schema.$ref;
|
||||
Object.assign(schema, resolved);
|
||||
|
|
Loading…
Reference in New Issue
Block a user