Skip to content

Commit a6068b3

Browse files
committed
Updated default stack limit from 10 to 8
1 parent e9cd9a7 commit a6068b3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/deref.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ module.exports = {
149149
*/
150150

151151
resolveRefs: function (schema, parameterSourceOption, components, schemaResolutionCache,
152-
resolveFor = 'CONVERSION', resolveTo = 'schema', stack = 0, seenRef = {}, stackLimit = 10, isAllOf = false) {
152+
resolveFor = 'CONVERSION', resolveTo = 'schema', stack = 0, seenRef = {}, stackLimit = 8, isAllOf = false) {
153153
var resolvedSchema, prop, splitRef,
154154
ERR_TOO_MANY_LEVELS = '<Error: Too many levels of nesting to fake this schema>';
155155
let concreteUtils = components && components.hasOwnProperty('concreteUtils') ?

lib/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ module.exports = {
155155
name: 'Schema resolution nesting limit',
156156
id: 'stackLimit',
157157
type: 'integer',
158-
default: 10,
158+
default: 8,
159159
description: 'Number of nesting limit till which schema resolution will happen. Increasing this limit may' +
160160
' result in more time to convert collection depending on complexity of specification. (To make sure this' +
161161
' option works correctly "optimizeConversion" option needs to be disabled)',

lib/schemaUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ module.exports = {
273273

274274
var computedOptions = _.clone(options);
275275

276-
computedOptions.stackLimit = 10;
276+
computedOptions.stackLimit = 8;
277277
// This is the score that is given to each spec on the basis of the
278278
// number of references present in spec and the number of requests that will be generated.
279279
// This ranges from 0-10.

0 commit comments

Comments
 (0)