Skip to content

Commit

Permalink
fix: take snapshot of schema to not overwrite inlined references
Browse files Browse the repository at this point in the history
fixes #203
  • Loading branch information
RomanHotsiy committed Feb 14, 2017
1 parent a5c03ab commit 77bc3c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils/spec-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 77bc3c4

Please sign in to comment.