mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +03:00
fix: take snapshot of schema to not overwrite inlined references
fixes #203
This commit is contained in:
parent
a5c03abbe4
commit
77bc3c44fc
|
@ -8,6 +8,7 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
|||
import { MdRenderer } from './md-renderer';
|
||||
|
||||
import { SwaggerOperation, SwaggerParameter } from './swagger-typings';
|
||||
import { snapshot } from './helpers';
|
||||
|
||||
function getDiscriminator(obj) {
|
||||
return obj.discriminator || obj['x-extendedDiscriminator'];
|
||||
|
@ -37,7 +38,7 @@ export class SpecManager {
|
|||
if (typeof urlOrObject === 'string') {
|
||||
this._url = urlOrObject;
|
||||
}
|
||||
this._schema = schema;
|
||||
this._schema = snapshot(schema);
|
||||
try {
|
||||
this.init();
|
||||
resolve(this._schema);
|
||||
|
|
Loading…
Reference in New Issue
Block a user