Schema validation using only TypeScript types?

This page summarizes the projects mentioned and recommended in the original post on /r/node

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • typia

    Super-fast/easy runtime validations and serializations through transformation

  • I guess you can rely on typescript transformers like they have done here: https://github.com/samchon/typescript-json

  • typebox

    Json Schema Type Builder with Static Type Resolution for TypeScript

  • I like typebox: https://github.com/sinclairzx81/typebox you end up with runtime validators and types.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • ajv

    The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)

  • I like typescript-json-schema. It requires a build-time script to work, but it takes your .d.ts files and outputs JSON that can be consumed by libraries at runtime like ajv. By default, its output doesn’t enforce constraints (but they are available if you like).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts