fix example rendering

This commit is contained in:
Daniel Schneider 2020-01-29 16:07:45 +01:00
parent c7233ecee5
commit f817d8b577

View File

@ -118,19 +118,10 @@ var common = {
return;
}
// Keep depth-based circular reference detection around to
// avoid errors in case '$ref's aren't being used
// /usr/local/bin/node bin/spectacle -d test/fixtures/billing.yaml
if (!options.depth) {
options.depth = 0;
}
options.depth++;
if (options.depth > 100) {
return;
}
options = _.cloneDeep(options);
// Watch for circular references with '$ref' and use that instead of
// trying to make a recursive example
// /usr/local/bin/node bin/spectacle -d test/fixtures/billing.yaml
if (!options.refsSeen) {
options.refsSeen = [];
}