Skip to content

Commit 77bc3c4

Browse files
committed
fix: take snapshot of schema to not overwrite inlined references
fixes #203
1 parent a5c03ab commit 77bc3c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/utils/spec-manager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject';
88
import { MdRenderer } from './md-renderer';
99

1010
import { SwaggerOperation, SwaggerParameter } from './swagger-typings';
11+
import { snapshot } from './helpers';
1112

1213
function getDiscriminator(obj) {
1314
return obj.discriminator || obj['x-extendedDiscriminator'];
@@ -37,7 +38,7 @@ export class SpecManager {
3738
if (typeof urlOrObject === 'string') {
3839
this._url = urlOrObject;
3940
}
40-
this._schema = schema;
41+
this._schema = snapshot(schema);
4142
try {
4243
this.init();
4344
resolve(this._schema);

0 commit comments

Comments
 (0)