Skip to content

Commit

Permalink
fix: create deep copy workaround for TD instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Apr 23, 2023
1 parent 7e1d23d commit 8f0b128
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/introduction/td-builder.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export class ThingDescriptionBuilderService {
},
};

// FIXME: Get rid of this workaround.
const clonedModel = JSON.parse(JSON.stringify(model));
const td = (await builder.getPartialTDs(clonedModel, options))[0];
this.built = td as ThingDescription;
// TODO: chose the right security schema using configs
this.built.securityDefinitions = { nosec: { scheme: 'nosec' } };
Expand Down

0 comments on commit 8f0b128

Please sign in to comment.