ValidCaseBuilder

class ValidCaseBuilder(path: String, method: String, operation: Operation, openAPI: OpenAPI, securityValueProvider: SecurityValueProvider = SecurityValueProvider(), schemaExampleValueGenerator: SchemaExampleValueGenerator = SchemaExampleValueGeneratorFactory().create())

Builds a valid positive TestCase for a given OpenAPI operation.

Inputs: operation metadata, OpenAPI model, and providers for security and example values. Output: Outcome.Success with a baseline valid case or Outcome.Failure with errors. Determinism: parameter iteration follows the OpenAPI parameter order; request body media type selection uses Consts.supportedMediaTypes order.

Parameters

path

API path template (e.g. "/pets/{id}")

method

HTTP method in lowercase as defined in the OpenAPI spec

operation

OpenAPI Operation describing the endpoint

openAPI

OpenAPI model used to resolve references

securityValueProvider

provider for security values used in authentication/authorization

schemaExampleValueGenerator

generator for example values from schemas

Constructors

Link copied to clipboard
constructor(path: String, method: String, operation: Operation, openAPI: OpenAPI, securityValueProvider: SecurityValueProvider = SecurityValueProvider(), schemaExampleValueGenerator: SchemaExampleValueGenerator = SchemaExampleValueGeneratorFactory().create())

Functions

Link copied to clipboard

Constructs a valid positive test case that satisfies required parameters, request body, and security requirements (when applicable).