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

    Type Alias InferFields<T, Ref>

    InferFields: IsSwagger2Doc<T> extends true
        ? __SchemaInferenceFellBack
        : T extends z.ZodType
            ? FieldOverrides<z.infer<T>>
            : T extends { openapi: unknown }
                ? Ref extends string
                    ? FieldOverrides<ResolveOpenAPIRef<T & Record<string, unknown>, Ref>>
                    : Record<string, FieldOverride>
                : T extends object
                    ? unknown extends FromJSONSchema<T>
                        ? Record<string, FieldOverride>
                        : FieldOverrides<FromJSONSchema<T>>
                    : Record<string, FieldOverride>

    Recursive mapped type that mirrors a schema's shape for per-field overrides. Dispatches on the schema kind in the same order as InferSchemaValue so the inferred override map tracks the inferred value shape.

    Exported so <SchemaView> and other consumers can type their fields prop against the same machinery <SchemaComponent> uses.

    Type Parameters

    • T
    • Ref extends string | undefined