Doc: SDK README uses incorrect case for zod-to-json-schema target value

Open 💬 1 comment Opened Apr 20, 2026 by hobostay

Description

In sdk/typescript/README.md line 72, the documentation states:

You can also create a JSON schema from a Zod schema using the zod-to-json-schema package and setting the target to "openAi".

And the code example at line 81:

outputSchema: zodToJsonSchema(schema, { target: "openAi" }),

However, the zod-to-json-schema package does not have a "openAi" target option. The valid target values are "jsonSchema7", "jsonSchema2019-09", "openApi3", etc. The value "openAi" is not a recognized target.

If this is a custom target supported by the version used in this project, it should be documented as such. Otherwise, users copying this example will get unexpected behavior.

Location

  • File: sdk/typescript/README.md, lines 72 and 81
  • Also in sample: sdk/typescript/samples/structured_output_zod.ts, line 17

Suggested fix

Verify whether "openAi" is actually supported by the zod-to-json-schema version used in this project. If not, update to the correct target value.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗