Behavior: generated --help examples and docs show stringArray flags as a JSON array literal (--guardrail-metric-ids '["fact__a","fact__b"]'), but cobra StringArray passes the value verbatim — the request body gets ONE element containing the JSON text. The server may accept and store it (verified: a garbage metric id persisted with exit 0) — silent data corruption from following the CLI's own docs. ~11 generated examples use this style; correct usage is repeated flags.
Carried fix: .speakeasy/patches/internal/flagutil/metadata.go.patch (PR #48) — a single value that parses as a JSON string array is expanded into its elements, making the documented syntax work and [] expressible. Repeated-flag form is unchanged.
Retire when: Speakeasy's example generator emits repeated-flag syntax for stringArray flags (or the framework natively accepts JSON arrays).
Behavior: generated
--helpexamples and docs show stringArray flags as a JSON array literal (--guardrail-metric-ids '["fact__a","fact__b"]'), but cobra StringArray passes the value verbatim — the request body gets ONE element containing the JSON text. The server may accept and store it (verified: a garbage metric id persisted with exit 0) — silent data corruption from following the CLI's own docs. ~11 generated examples use this style; correct usage is repeated flags.Carried fix:
.speakeasy/patches/internal/flagutil/metadata.go.patch(PR #48) — a single value that parses as a JSON string array is expanded into its elements, making the documented syntax work and[]expressible. Repeated-flag form is unchanged.Retire when: Speakeasy's example generator emits repeated-flag syntax for stringArray flags (or the framework natively accepts JSON arrays).