Open leafoflegend opened 6 years ago
This had to do with circular references.
let mockgen = null;
SwaggerParser
.dereference(latestSpecs, { dereference: { circular: 'ignore' } })
.then((specs) => {
deRefedSpecs = specs;
mockgen = swagmock(deRefedSpecs, { validated: true });
})
.catch((e) => {
console.log(chalk.red('Dereferencing swagger resulted in error.'));
console.log(chalk.red(e));
});
I used the above code to deal with this - but sadly, any of the routes with circular references do not get the advantages of swagmock. Is there any way around this? To generate mock responses for routes that have circular refs?
This is when I do my first
mockgen.response
. Any ideas here?