Makes oRPC's ZodToJsonSchemaConverter honor a temporal-zod validator's
full JSON Schema metadata.
oRPC's interceptors are onion-middleware around every node's conversion: an
interceptor may short-circuit by returning its own [required, jsonSchema]
instead of calling next(), fully replacing the structural conversion (so no
leftover anyOf from the underlying z.union). For a schema in
temporalRegistry we return its registered JSON Schema directly, so
zInstant → { type: "string", format: "date-time", pattern, … }. This is
general over every Temporal type (zPlainDate → date, zDuration →
duration, …).
The lookup is scoped to temporal-zod's own registry rather than
z.globalRegistry. The global registry is shared with the whole application,
so matching on the shape of its metadata would also short-circuit a
consumer's own .meta({ type: "string", format: "email" }) — replacing its
structural conversion and silently dropping the constraints oRPC derives from
the schema's checks. Every other schema, annotated or not, falls through to
next() untouched, leaving oRPC's $ref dedup and example rendering alone.
Makes oRPC's
ZodToJsonSchemaConverterhonor atemporal-zodvalidator's full JSON Schema metadata.oRPC's
interceptorsare onion-middleware around every node's conversion: an interceptor may short-circuit by returning its own[required, jsonSchema]instead of callingnext(), fully replacing the structural conversion (so no leftoveranyOffrom the underlyingz.union). For a schema intemporalRegistrywe return its registered JSON Schema directly, sozInstant→{ type: "string", format: "date-time", pattern, … }. This is general over every Temporal type (zPlainDate→date,zDuration→duration, …).The lookup is scoped to
temporal-zod's own registry rather thanz.globalRegistry. The global registry is shared with the whole application, so matching on the shape of its metadata would also short-circuit a consumer's own.meta({ type: "string", format: "email" })— replacing its structural conversion and silently dropping the constraints oRPC derives from the schema's checks. Every other schema, annotated or not, falls through tonext()untouched, leaving oRPC's$refdedup and example rendering alone.