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 }}
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Validators drop the description of anyOf union fields #139
The generated validators lose a field's OpenAPI description when the field's schema is an anyOf union. The description is on the union in the spec, but the validator emits a bare union with no description attached.
Example: the monitor (detector) config field.
Spec path: paths["/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/"].put.responses.200.content["application/json"].schema.properties.config. Since 1.52.0 it's an anyOf of the per-type configs, with description: "Configuration of the monitor, which depends on its type" beside the anyOf.
In 1.53.0, vUpdateOrganizationDetectorResponse in dist/valibot.js emits config: v.union([...]) with no v.description(...). The Zod output has no description for it either. types.gen.d.ts still has it as JSDoc.
In 1.51.0 the field was a plain object, and the validators carried v.description("Configuration of the monitor, which depends on its type").
Consumers that read field descriptions from the validators lose them. For example, the Sentry CLI's generated skill reference now shows an empty description for this field. Union members keep their own descriptions. Only the description on the union itself is lost.
scripts/describe-valibot-schemas.mjs only rewrites the v.metadata({ description }) calls that the generator emits, so the description is probably missing before that step runs. This is an inference. I haven't traced the generator.
Activity
fix(cli): Keep response validation working with @sentry/api 1.53.0 (#…