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
Update the angular, angular-query and fetch `runtimeValidation` reference entries
to document the object form `{ strategy: 'throw' | 'both' }` and the
log-then-throw behaviour of `both`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Enable Zod runtime validation for Angular query responses. Requires `schemas: { type: 'zod' }`. When enabled, responses are validated via `Schema.parse()` in the RxJS pipeline. Skipped for primitive types and custom mutators.
1289
1289
1290
+
The boolean form is preserved for backward compatibility: `true` ≡ `{ strategy: 'throw' }`. With `{ strategy: 'both' }` an invalid response is first logged through `console.error('[orval] <operation> response validation failed', error)` with the raw `ZodError`, then re-thrown — so the failure still surfaces through the client's native error channel while giving production visibility into contract drift.
Enable Zod runtime validation for fetch client responses. Requires `schemas: { type: 'zod' }`. When enabled, JSON responses are validated via `Schema.parse()` before being returned.
1913
1922
1923
+
The boolean form is preserved for backward compatibility: `true` ≡ `{ strategy: 'throw' }`. With `{ strategy: 'both' }` an invalid response is first logged through `console.error('[orval] <operation> response validation failed', error)` with the raw `ZodError`, then re-thrown (rejecting the returned promise) — giving production visibility into contract drift while still failing fast.
|`fetch`|`override.fetch.runtimeValidation`| ✅ | Validates JSON responses via `Schema.parse()`|
2015
2026
| any client with custom mutator | varies | ⚠️ | Runtime validation may be bypassed depending on mutator path and signature (see [#2858](https://github.com/orval-labs/orval/issues/2858)) |
2016
2027
2028
+
All three supporting clients accept the object form `{ strategy: 'throw' | 'both' }`. `throw` (the default, equivalent to `true`) parses and throws; `both` additionally `console.error`s the raw `ZodError` before re-throwing, for production observability without giving up fail-fast behaviour.
0 commit comments