CombinationBudget

class CombinationBudget(limit: Int, errorContext: ErrorContext)

Tracks and enforces budget limits during schema combination generation.

Prevents combinatorial explosion by failing fast when the number of schema combinations exceeds the configured limit. This protects against OOM errors when processing OpenAPI specs with deeply nested oneOf/anyOf/allOf structures.

Constructors

Link copied to clipboard
constructor(limit: Int, errorContext: ErrorContext)

Properties

Link copied to clipboard

Current number of combinations generated.

Functions

Link copied to clipboard
fun consume(count: Int)

Records additional combinations and throws if the budget exceeded.