Mirrors InferFields's dispatch order: Zod schema → z.infer,
OpenAPI doc + ref → ResolveOpenAPIRef, plain JSON Schema object →
FromJSONSchema, everything else → unknown. The Mode parameter
is plumbed through to FromJSONSchema / ResolveOpenAPIRef so
readOnly / writeOnly keywords participate in the inferred
object shape — "output" for the rendered value, "input" for the
onChange argument.
When the schema's value type cannot be statically determined (e.g.
a runtime Record<string, unknown> JSON Schema, or an OpenAPI doc
without a ref), the result falls back to unknown so callers can
still supply arbitrary values.
Infer the data type carried by the schema input.
Mirrors InferFields's dispatch order: Zod schema →
z.infer, OpenAPI doc + ref →ResolveOpenAPIRef, plain JSON Schema object →FromJSONSchema, everything else →unknown. TheModeparameter is plumbed through toFromJSONSchema/ResolveOpenAPIRefsoreadOnly/writeOnlykeywords participate in the inferred object shape —"output"for the rendered value,"input"for theonChangeargument.When the schema's value type cannot be statically determined (e.g. a runtime
Record<string, unknown>JSON Schema, or an OpenAPI doc without a ref), the result falls back tounknownso callers can still supply arbitrary values.