fix: take snapshot of schema to not overwrite inlined references

fixes #203
This commit is contained in:
Roman Hotsiy 2017-02-14 10:49:42 +02:00
parent a5c03abbe4
commit 77bc3c44fc
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -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);