You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dynamic variable parity: $timestamp offsets, $localDatetime and the $random.* family #34
apic's built-ins (internal/runner/vars.go:129-189) cover $uuid, $timestamp, $isoTimestamp, $datetime, $randomInt, $processEnv, $dotenv and $env.X. REST Client files also use offsets ({{$timestamp -1 d}}, {{$datetime iso8601 1 h}}) and {{$localDatetime}}; JetBrains files use $random.integer(1, 100), $random.alphabetic(10), $random.email and friends. Those files currently fail with a missing-variable error under apic.
What
Acceptance criteria:
$timestamp [offset unit] and $datetime <format> [offset unit] accept the REST Client offset grammar (-1 d, 2 h, 30 m, -10 s, 1 w, 1 M, 1 y).
$localDatetime [format] formats in the local zone with the same options as $datetime.
JetBrains: $random.integer(min, max), $random.float(min, max), $random.alphabetic(n), $random.alphanumeric(n), $random.hexadecimal(n), $random.email, $random.uuid. Argument-less forms take the JetBrains defaults.
$exampleServer is deliberately not added (JetBrains-only concept); $projectRoot resolves to the apic project root since it is cheap and useful for < {{$projectRoot}}/fixtures/x.json.
The nesting cap of 8 (vars.go:76-78) still applies; the random functions are not nonces and keep the existing //nolint:gosec reasoning.
A table-driven test per function, with a fixed clock injected for the time-based ones; a parse-error test for a bad offset that names the placeholder and the line.
Shipped in #108 (merged as 1c7ba70): offsets on $timestamp and $datetime (-1 d, 2 h, 1 M, 1 Q, 1 y, …), $localDatetime [format] [offset], the JetBrains $random.integer/float/alphabetic/alphanumeric/hexadecimal/email/uuid family with defaults, and $projectRoot; a bad offset is a usage error naming the placeholder and line. See internal/runner/vars.go; the tests pin the runner's clock.
Activity
Dynamic variable parity: offsets, $localDatetime, $random.* and $proj…
dataGriff commentedon Sep 22, 2026
Shipped in #108 (merged as 1c7ba70): offsets on
$timestampand$datetime(-1 d,2 h,1 M,1 Q,1 y, …),$localDatetime [format] [offset], the JetBrains$random.integer/float/alphabetic/alphanumeric/hexadecimal/email/uuidfamily with defaults, and$projectRoot; a bad offset is a usage error naming the placeholder and line. Seeinternal/runner/vars.go; the tests pin the runner's clock.Generated by Claude Code