TestGenerationContext

SPI-facing context for rule/provider evaluation during test generation.

This contract is intentionally small and stable. Concrete orchestration may carry more internal state than what is exposed here.

Determinism: providers and rules should treat this context as immutable and avoid side effects.

Properties

Link copied to clipboard

Provider for basic test data values (e.g., strings, integers).

Link copied to clipboard

Optional budget limiting schema combinations to prevent explosion.

Link copied to clipboard
abstract val depth: Int

Current recursion depth in schema traversal.

Link copied to clipboard
abstract val maxDepth: Int

Maximum schema traversal depth.

Link copied to clipboard
abstract val openAPI: OpenAPI

The parsed OpenAPI specification being processed.

Link copied to clipboard
abstract val operation: Operation

The current operation being processed.

Link copied to clipboard

Generator for deriving example values from schemas.

Link copied to clipboard

Merger for composed schemas (allOf/anyOf/oneOf).

Link copied to clipboard
abstract val schemaPath: List<String>

Path of property/item names leading to the current schema location.

Link copied to clipboard

Provider for security scheme values.

Link copied to clipboard
abstract val validCase: TestCase

The valid (baseline) test case from which negative cases are derived.

Link copied to clipboard

Set of $ref pointers already visited in the current traversal path.

Functions

Link copied to clipboard
abstract fun checkSkip(schema: Schema<*>): SkipReason?

Checks if the schema should be skipped based on cycles or depth.

Link copied to clipboard
abstract fun withVisitedSchema(schema: Schema<*>, name: String): TestGenerationContext?

Returns a new context with the schema visited, or null if it should be skipped.