Documentation Index
Fetch the complete documentation index at: https://mintlify.com/atulin/forged/llms.txt
Use this file to discover all available pages before exploring further.
ForgeBasic is the foundation of the Forged generator system. Accessed via f.Basic, it exposes two complementary primitives: a literal generator that always returns the same fixed value, and a function generator that delegates to a caller-supplied lambda each time a value is needed. These are particularly useful when you need deterministic fields in an otherwise random data set, or when you want to integrate custom logic — external service calls, computed values, counters — into a Forged configuration.
Literal<T>
Creates a generator that always produces the same constant value regardless of how many times it is invoked.The constant value the generator will always return. Can be any type — strings,
enums, numbers, complex objects, or
null for reference types.A
Generator<T> that calls Generate() → always the same literal value.Literal whenever a field must be a fixed constant across all generated records — for example, to pin a status code, a schema version number, or a sentinel value in test fixtures.
Func<T>
Creates a generator that invokes the providedFunc<T> delegate each time a new value is requested. The delegate is called fresh on every Generate() call, so mutable or stateful lambdas produce different values over time.
A parameterless delegate that returns a value of type
T. Invoked once per
generated record. May close over external state, call external services, or
perform arbitrary computation.A
Generator<T> that calls Generate() → evaluates func() and returns the result.