Paste any JSON:API document — single resource, collection, or compound document with included — and get a Valibot v.object for data, attributes, relationships, and links. Smaller bundle than Zod, same boundary guarantee.
JSON:API enforces a strict envelope (type, id, attributes, relationships, links, included), and the spec evolves more slowly than the per-resource attributes inside it. That makes the envelope easy to validate, and the attributes the place where shape drift bites you. A generated Valibot schema captures both layers in one paste: the envelope you can rely on across every resource type, and the attributes shape pinned to the document you actually fetched. Wrap the result with v.parse on every fetch and the rest of your code consumes a strongly typed resource.
Use the result on the frontend (Ember Data, JSON:API-Ruby, Laravel JSON:API consumers) where validating server responses with a single v.parse call is much cheaper than wrapping every property access in optional chaining. Valibot's small footprint helps for SPAs and static sites where every kilobyte at first paint matters. For paginated collections, swap data into a v.array of the same item schema; for compound documents, the included array can be typed as a v.variant of related-resource schemas you can narrow on resource.type.