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

    Type Alias FromJSONSchemaMode

    FromJSONSchemaMode: "input" | "output" | "both"

    Direction of inference for FromJSONSchema.

    JSON Schema's readOnly / writeOnly keywords carry directional semantics: a readOnly property must not appear in client → server payloads, and a writeOnly property must not appear in server → client payloads. Mapping a schema to a TypeScript type therefore requires knowing which direction the value travels.

    • "both" — return every property regardless of readOnly / writeOnly. Default, preserves the prior behaviour for callers that do not care about the distinction.
    • "input" — omit properties marked readOnly: true. Use for the shape consumers may supply (e.g. onChange arguments, POST bodies).
    • "output" — omit properties marked writeOnly: true. Use for the shape the server returns (e.g. rendered value props, GET responses).