The OpenAPI Test Set Generator helps create test scenarios from OpenAPI specifications by generating valid and invalid examples based on schema definitions.
The generator supports modifying properties in example objects to create test scenarios. It can now handle both top-level and nested properties.
The generator automatically finds and modifies properties at any level of nesting based on the conditions specified in the where
clause:
variantsOnExamples:
property:
# This will find and modify all string properties, including nested ones
- where:
type: 'string'
do:
set: 'modified value'
valid: true
# This will find and modify all object properties
- where:
type: 'object'
do:
set: null
valid: false
# This will find and modify all string properties with format "email",
# even if they are nested deep in the object structure
- where:
type: 'string'
format: 'email'
do:
set: 'modified@example.com'
valid: true
The generator will recursively traverse the object structure to find and modify all properties that match the specified conditions, regardless of how deeply they are nested.
See LICENSE.txt.