Skip to content

Commit 558769c

Browse files
committed
Fix tests for default options and fix when the schema map is populated
1 parent 4fafe00 commit 558769c

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

OPTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ requestParametersResolution|enum|Example, Schema|Schema|Select whether to genera
88
exampleParametersResolution|enum|Example, Schema|Example|Select whether to generate the response parameters based on the [schema](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject) or the [example](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject) in the schema.|CONVERSION
99
folderStrategy|enum|Paths, Tags|Paths|Select whether to create folders according to the spec’s paths or tags.|CONVERSION
1010
schemaFaker|boolean|-|true|Whether or not schemas should be faked.|CONVERSION
11-
stackLimit|integer|-|8|Number of nesting limit till which schema resolution will happen. Increasing this limit may result in more time to convert collection depending on complexity of specification. (To make sure this option works correctly "optimizeConversion" option needs to be disabled)|CONVERSION
11+
stackLimit|integer|-|10|Number of nesting limit till which schema resolution will happen. Increasing this limit may result in more time to convert collection depending on complexity of specification. (To make sure this option works correctly "optimizeConversion" option needs to be disabled)|CONVERSION
1212
includeAuthInfoInExample|boolean|-|true|Select whether to include authentication parameters in the example request|CONVERSION
1313
shortValidationErrors|boolean|-|false|Whether detailed error messages are required for request <> schema validation operations.|VALIDATION
1414
validationPropertiesToIgnore|array|-|[]|Specific properties (parts of a request/response pair) to ignore during validation. Must be sent as an array of strings. Valid inputs in the array: PATHVARIABLE, QUERYPARAM, HEADER, BODY, RESPONSE_HEADER, RESPONSE_BODY|VALIDATION

assets/json-schema-faker.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24694,11 +24694,12 @@ function extend() {
2469424694
// avoid validation of values that are in pm variable format (i.e. '{{userId}}')
2469524695
result = validateSchema(schema, schema.example, { ignoreUnresolvedVariables: true });
2469624696
}
24697-
}
2469824697

24699-
finalResult = result && result.length === 0;
24698+
// Store the final result that needs to be used in the seen map
24699+
finalResult = result && result.length === 0;
24700+
seenSchemaMap.set(hashSchema, finalResult);
24701+
}
2470024702

24701-
seenSchemaMap.set(hashSchema, finalResult);
2470224703
// Use example only if valid
2470324704
if (finalResult) {
2470424705
return schema.example;

test/system/structure.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const optionIds = [
9696
stackLimit: {
9797
name: 'Schema resolution nesting limit',
9898
type: 'integer',
99-
default: 8,
99+
default: 10,
100100
description: 'Number of nesting limit till which schema resolution will happen. Increasing this limit may' +
101101
' result in more time to convert collection depending on complexity of specification. (To make sure this' +
102102
' option works correctly "optimizeConversion" option needs to be disabled)'

0 commit comments

Comments
 (0)