schema-components - v3.7.0
    Preparing search index...

    Type Alias InferSchemaValue<T, Ref, Mode>

    InferSchemaValue: IsSwagger2Doc<T> extends true
        ? __SchemaInferenceFellBack
        : T extends z.ZodType
            ? Mode extends "input" ? z.input<T> : z.output<T>
            : T extends { openapi: unknown }
                ? Ref extends string
                    ? ResolveOpenAPIRef<T & Record<string, unknown>, Ref, [], Mode>
                    : unknown
                : T extends object
                    ? (
                        | FromJSONSchema<T, Record<string, never>, [], Mode>
                        | (unknown extends FromJSONSchema<T> ? unknown : never)
                    ) extends infer V
                        ? V
                        : unknown
                    : unknown

    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. 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.

    Type Parameters