Skip to content

fix(openapi): read ~standard.jsonSchema via cast, not by widening StandardSchemaV1 - #3

Merged
isaacwasserman merged 1 commit into
mainfrom
fix-standard-schema-inference
Jul 13, 2026
Merged

fix(openapi): read ~standard.jsonSchema via cast, not by widening StandardSchemaV1#3
isaacwasserman merged 1 commit into
mainfrom
fix-standard-schema-inference

Conversation

@isaacwasserman

Copy link
Copy Markdown
Owner

Follow-up to #1. Adding jsonSchema? to the vendored StandardSchemaV1.Props diverged it from @standard-schema/spec and perturbed generic inference downstream (a consumer's endpoint body type collapsed to undefined). Revert the spec type and read ~standard.jsonSchema via a local cast in the generator.

Build + 198 tests pass; verified against the downstream (futonic) typecheck + tests.

🤖 Generated with Claude Code

…ndardSchemaV1

Adding `jsonSchema?` to the vendored `StandardSchemaV1.Props` diverged it from
`@standard-schema/spec` and perturbed generic type inference in consumers — an
endpoint's body type could collapse to `undefined` when the definer is used
behind a generic wrapper. Revert the spec type to its original shape and read
`~standard.jsonSchema` through a local cast in the generator instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@isaacwasserman
isaacwasserman merged commit faa9bdf into main Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant