# Data schema definition

> AI-ranked search results for `declarative data schemas` on awesome-repositories.com — ordered by an LLM for relevance, best match first. 118 total matches; showing the top 27.

Explore on the web: https://awesome-repositories.com/q/declarative-data-schemas

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [this search on awesome-repositories.com](https://awesome-repositories.com/q/declarative-data-schemas).**

## Results

- [ianstormtaylor/superstruct](https://awesome-repositories.com/repository/ianstormtaylor-superstruct.md) (7,141 ⭐) — Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined shapes and types. It functions as a composable schema builder and a TypeScript schema validator, ensuring that runtime data checks remain synchronized with static type definitions.

The library features a data coercion engine that transforms input values or injects default values before the validation process is executed. It enables the creation of complex validation rules by nesting, merging, or omitting properties from existing structures.

Its capabilities cover the validatio
- [samuelcolvin/pydantic](https://awesome-repositories.com/repository/samuelcolvin-pydantic.md) (28,043 ⭐) — Pydantic is a data validation library and parsing framework for Python. It functions as a type-based schema validator that uses standard Python type annotations to ensure input data conforms to predefined structural schemas.

The project provides capabilities for parsing raw data into typed objects through automatic type conversion and validation. This includes the serialization of data and the validation of data structures to enforce correctness.

The framework covers several application areas, including the verification of API requests and the management of application configurations. It all
- [ajv-validator/ajv](https://awesome-repositories.com/repository/ajv-validator-ajv.md) (14,733 ⭐) — Ajv is a high-performance data validation framework that compiles JSON schemas into optimized, standalone JavaScript functions. By transforming declarative schema definitions into executable code, it eliminates runtime interpretation overhead and provides a secure, efficient way to enforce data integrity across both browser and server environments.

The library distinguishes itself through its focus on performance and type safety. It employs advanced compilation techniques, including abstract syntax tree optimization and function caching, to ensure rapid validation. Beyond standard checks, it
- [pydantic/pydantic](https://awesome-repositories.com/repository/pydantic-pydantic.md) (26,932 ⭐) — Pydantic is a data validation and serialization library that enforces schema constraints and performs type conversion on complex data structures. It utilizes standard Python type annotations to define data models, allowing developers to establish structured schemas that automatically enforce business rules and constraints without the need for custom domain-specific languages.

The library distinguishes itself by transforming high-level model definitions into optimized code during initialization to minimize runtime overhead. It supports recursive validation for nested data structures and employ
- [colinhacks/zod](https://awesome-repositories.com/repository/colinhacks-zod.md) (43,036 ⭐) — Zod is a TypeScript-first schema declaration and validation library designed to ensure end-to-end data integrity. It functions as a runtime type guard, allowing developers to define complex data structures through a declarative, chainable syntax. By using these schema definitions, the library automatically derives static TypeScript types, eliminating the need for manual type duplication and ensuring that runtime data matches expected application contracts.

The library distinguishes itself through functional schema composition, which enables the creation of hierarchical structures by nesting a
- [sindresorhus/ow](https://awesome-repositories.com/repository/sindresorhus-ow.md) (3,868 ⭐) — ow is a type-safe schema validation library for TypeScript that verifies data integrity at runtime. It functions as a runtime validation framework and type guard utility, ensuring that JavaScript values match expected types and schemas before they are processed.

The library synchronizes runtime data checks with static TypeScript type definitions, allowing users to extract type definitions directly from validation predicates. This integration enables type narrowing, where a successful validation result refines the variable type for safer usage in the code.

The framework uses a chainable API t
- [hapijs/joi](https://awesome-repositories.com/repository/hapijs-joi.md) (21,192 ⭐) — Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It functions as an object schema validator and parser, ensuring that input data matches specific types and formats before it is processed by an application.

The library features a conditional validation engine capable of dynamic schema enforcement, where validation logic and dependencies change based on the values of other keys within an object. It also serves as a data casting and sanitization tool, transforming input values into target types and removing sensitive keys from the
- [jquense/yup](https://awesome-repositories.com/repository/jquense-yup.md) (23,673 ⭐) — Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as an object schema validator and a data coercion engine, allowing developers to transform raw input values into desired types before performing validation checks.

The library is distinguished by its support for dynamic schema validation, where rules can be adjusted at runtime based on sibling field values or external context. It also enables recursive data structuring for polymorphic fields and provides a system for extracting static TypeScript interfaces from runtime schema def
- [go-ozzo/ozzo-validation](https://awesome-repositories.com/repository/go-ozzo-ozzo-validation.md) (4,072 ⭐) — ozzo-validation is a programmable data validation library for Go that verifies structs, maps, and primitive types using a declarative, rule-based approach. It functions as an interface-based validator, allowing for the recursive checking of nested data structures and custom types without the use of struct tags.

The framework distinguishes itself as a context-aware validation engine, supporting the propagation of request-scoped data to rules that depend on external state. It provides extensive extensibility through custom rule definitions and the ability to override default failure text with l
- [open-circle/valibot](https://awesome-repositories.com/repository/open-circle-valibot.md) (8,769 ⭐) — Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.
- [sideway/joi](https://awesome-repositories.com/repository/sideway-joi.md) (21,192 ⭐) — Joi is a JavaScript data validation library used to define schemas that ensure the structure and data types of objects remain consistent. It functions as a schema-based validator and object schema definition tool, preventing invalid information from entering an application by checking data against predefined constraints and rules.

The library employs a chainable fluent interface and a constraint-based validation engine to build complex validation pipelines. It utilizes recursive tree traversal to validate nested data structures and a type-coercion pipeline to transform input values into the t
- [epoberezkin/ajv](https://awesome-repositories.com/repository/epoberezkin-ajv.md) (14,748 ⭐) — Ajv is a JSON Schema validator and schema compilation engine used to verify that JavaScript objects conform to specific JSON Schema definitions. It functions as a data coercer and localization tool, allowing for the application of default values and the translation of validation error messages into different languages.

The project converts declarative JSON Schema definitions into optimized JavaScript functions to increase validation speed. It supports the extension of validation logic through custom keywords and the generation of standalone validation code that executes without external depen
- [marshmallow-code/marshmallow](https://awesome-repositories.com/repository/marshmallow-code-marshmallow.md) (7,239 ⭐) — Marshmallow is a Python data serialization library and validation framework. It functions as a bridge that transforms complex application objects into primitive data types for storage or network transmission and vice versa.

The library utilizes a schema-based approach to validate that incoming data conforms to specific types and constraints. It employs a two-way transformation pipeline consisting of separate load and dump phases to handle deserialization and serialization.

The framework supports class-based schema definitions with declarative field validation and recursive schema nesting for
- [arktypeio/arktype](https://awesome-repositories.com/repository/arktypeio-arktype.md) (7,780 ⭐) — Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution.

The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida
- [cue-lang/cue](https://awesome-repositories.com/repository/cue-lang-cue.md) (6,147 ⭐) — CUE is a constraint-based configuration language designed for data validation, schema definition, and code generation. At its core, it unifies types and values into a single concept, enabling compile-time validation that catches structural and value errors before runtime. The language treats data and constraints as the same thing, allowing a single definition to serve as both a schema and concrete configuration data.

CUE distinguishes itself through its constraint-based unification engine, which combines multiple configuration sources into a single coherent result by merging their constraints
- [protobufjs/protobuf.js](https://awesome-repositories.com/repository/protobufjs-protobuf-js.md) (10,558 ⭐) — protobuf.js is a JavaScript and TypeScript library for encoding and decoding structured data using the Protocol Buffers binary format. It functions as a dynamic parser that can load and process schemas at runtime, a JSON transcoder for converting messages to human-readable formats, and a framework for building transport-agnostic remote procedure call clients.

The project distinguishes itself by offering both dynamic message handling and a static code generator that produces TypeScript declarations and JavaScript modules to reduce runtime overhead. It also provides a reflection API for definin
- [protocolbuffers/protobuf](https://awesome-repositories.com/repository/protocolbuffers-protobuf.md) (71,359 ⭐) — Protocol Buffers is a language-neutral, platform-agnostic mechanism for serializing structured data. It provides a schema-driven toolchain that compiles declarative data definitions into type-safe source code, enabling consistent communication and strongly typed API contracts across services written in different programming languages.

The project distinguishes itself through a highly efficient binary wire format that utilizes tag-based encoding and variable-width integer compression to minimize payload size and processing overhead. It supports robust evolutionary schema management, allowing d
- [samchon/typia](https://awesome-repositories.com/repository/samchon-typia.md) (5,837 ⭐) — Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation, serialization, and schema functions without requiring decorators or separate schema files. It generates optimized validation and serialization code during TypeScript compilation, producing dedicated functions for each type that eliminate runtime schema objects for faster execution.

The project extends this core capability into several integrated areas. It generates fully typed client SDKs from NestJS controller source code, keeping server and client types synchronized automatically. It
- [typestack/class-validator](https://awesome-repositories.com/repository/typestack-class-validator.md) (11,796 ⭐) — class-validator is a TypeScript class validation library that uses decorators to define constraints and rules for object properties. It functions as a decorator-based schema validator that ensures data integrity and structural correctness through a combination of synchronous checks and promise-based asynchronous rules.

The library provides a recursive validation system for checking complex data hierarchies, including nested classes and individual elements within collections. It includes an object property whitelist utility capable of stripping undocumented properties or blocking unknown field
- [ent/ent](https://awesome-repositories.com/repository/ent-ent.md) (17,110 ⭐) — Ent is a statically typed entity framework for Go that models database structures as a graph of nodes and edges. It functions as a code generation engine that transforms schema definitions into type-safe database clients, query builders, and migration scripts. By representing data as interconnected entities, the framework enables intuitive traversal of complex relationships and ensures that database interactions remain consistent with the application model at compile time.

The framework distinguishes itself through its graph-based approach to data modeling and its reliance on compile-time cod
- [fastapi/sqlmodel](https://awesome-repositories.com/repository/fastapi-sqlmodel.md) (18,137 ⭐) — SQLModel is a type-safe object-relational mapping library for Python that integrates database schema definitions with data validation logic. By combining these two roles into a single class, it allows developers to manage relational data structures and enforce data integrity for web APIs simultaneously. The framework is built to support asynchronous database operations, enabling high-performance applications to execute queries and transactions without blocking the main execution thread.

The library distinguishes itself by leveraging Python type hints to provide IDE autocompletion and compile-
- [keleshev/schema](https://awesome-repositories.com/repository/keleshev-schema.md) (2,943 ⭐) — Schema validation just got Pythonic
- [meteor-community-packages/meteor-simple-schema](https://awesome-repositories.com/repository/meteor-community-packages-meteor-simple-schema.md) (915 ⭐) — This library provides a comprehensive system for defining data schemas and enforcing structural integrity within JavaScript applications. It enables developers to construct declarative rules for complex, nested objects, ensuring that data conforms to expected types and constraints before it is processed or stored. By integrating directly with the Meteor framework, it serves as a central tool for maintaining consistent data structures across collections and remote procedure calls.

The project distinguishes itself through its deep integration with reactive data systems, allowing validation stat
- [spatie/data-transfer-object](https://awesome-repositories.com/repository/spatie-data-transfer-object.md) (2,226 ⭐) — This library provides a framework for defining typed, immutable data structures in PHP. It enables developers to construct structured objects from raw input arrays, ensuring consistent data shapes and schema integrity across different layers of an application. By enforcing strict property types and validation rules during instantiation, the library prevents invalid data states and simplifies the handling of complex information.

The project distinguishes itself through its use of attribute-driven metadata, which allows for property renaming, custom validation, and serialization logic directly
- [plumatic/schema](https://awesome-repositories.com/repository/plumatic-schema.md) (2,462 ⭐) — Clojure(Script) library for declarative data description and validation
- [schema-inspector/schema-inspector](https://awesome-repositories.com/repository/schema-inspector-schema-inspector.md) (503 ⭐) — Schema-Inspector is a simple JavaScript object sanitization and validation module.
- [jsonrainbow/json-schema](https://awesome-repositories.com/repository/jsonrainbow-json-schema.md) (3,630 ⭐) — JSON Schema for PHP
