mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 16:46:34 +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 resolved = this.schemaMgr.byPointer(schema.$ref);
|
||||||
let baseName = JsonPointer.baseName(schema.$ref);
|
let baseName = JsonPointer.baseName(schema.$ref);
|
||||||
// if resolved schema doesn't have title use name from ref
|
// if resolved schema doesn't have title use name from ref
|
||||||
|
resolved = Object.assign({}, resolved);
|
||||||
resolved.title = resolved.title || baseName;
|
resolved.title = resolved.title || baseName;
|
||||||
resolved._pointer = schema.$ref;
|
resolved._pointer = schema.$ref;
|
||||||
Object.assign(schema, resolved);
|
Object.assign(schema, resolved);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user