Foodtruck Order — TypeScript Reference - v0.1.0
    Preparing search index...

    Function parseJsonBody

    • Validate JSON at a route boundary and expose only caller-allowlisted field names.

      Feature routes supply their Zod schema and stable issue-code mapping. Zod's raw messages, received values, and unknown property names are never returned to clients.

      Type Parameters

      • T

      Parameters

      • schema: ZodType<T>
      • body: unknown
      • fields: Readonly<Record<string, Readonly<Record<string, string>> | undefined>>

      Returns T