awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com

Data schema definition

Ranking updated Jul 18, 2026

For declarative data schemas, the first results are ianstormtaylor/superstruct (Superstruct is a TypeScript-first library that allows you to define complex, nested data schemas declaratively while providing runtime validation and automatic type inference, perfectly matching the requirements for a code-first validation tool), samuelcolvin/pydantic (Pydantic is a comprehensive, industry-standard library for defining data schemas and enforcing runtime validation using Python type annotations, perfectly matching the requirement for declarative, code-first data modeling) and ajv-validator/ajv (Ajv is a high-performance, code-first validation library that uses declarative JSON schemas to generate optimized, type-safe validation functions for both browser and server environments). pydantic/pydantic and colinhacks/zod round out the shortlist. Compare the match explanations and check the project documentation against your requirements.

Explore the best declarative data schema libraries. Compare top-rated tools by features and activity to find the best fit for your project.

Data schema definition

Find the best repos with AI.We'll search the best matching repositories with AI.
  • ianstormtaylor/superstructianstormtaylor avatar

    ianstormtaylor/superstruct

    7,141View on GitHub↗

    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

    Superstruct is a TypeScript-first library that allows you to define complex, nested data schemas declaratively while providing runtime validation and automatic type inference, perfectly matching the requirements for a code-first validation tool.

    TypeScriptRecursive Validation EnginesRuntime ValidationType-Safe Schema Validations
    View on GitHub↗7,141
  • samuelcolvin/pydanticsamuelcolvin avatar

    samuelcolvin/pydantic

    28,043View on GitHub↗

    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

    Pydantic is a comprehensive, industry-standard library for defining data schemas and enforcing runtime validation using Python type annotations, perfectly matching the requirement for declarative, code-first data modeling.

    PythonRuntime Type GuardsType-Hint-Based Schema Definitions
    View on GitHub↗28,043
  • ajv-validator/ajvajv-validator avatar

    ajv-validator/ajv

    14,733View on GitHub↗

    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

    Ajv is a high-performance, code-first validation library that uses declarative JSON schemas to generate optimized, type-safe validation functions for both browser and server environments.

    TypeScriptDeep Property ValidationType-Safe Schema ValidationsRuntime Type Guards
    View on GitHub↗14,733
  • pydantic/pydanticpydantic avatar

    pydantic/pydantic

    26,932View on GitHub↗

    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

    Pydantic is a comprehensive, industry-standard library that uses Python type annotations to define declarative schemas, providing robust runtime validation, nested object support, and detailed error reporting.

    PythonRecursive Validation EnginesType-Hint-Based Schema Definitions
    View on GitHub↗26,932
  • colinhacks/zodcolinhacks avatar

    colinhacks/zod

    43,036View on GitHub↗

    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

    Zod is a TypeScript-first library that allows you to define complex, nested data schemas declaratively, providing both static type inference and robust runtime validation with detailed error reporting.

    TypeScriptValidation Error HandlersRuntime Type GuardsValidation Error Formatters
    View on GitHub↗43,036
  • sindresorhus/owsindresorhus avatar

    sindresorhus/ow

    3,868View on GitHub↗

    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

    This library provides a declarative, chainable API for defining runtime validation rules and schema enforcement in TypeScript, making it a direct fit for code-first data validation.

    TypeScriptRuntime ValidationType-Safe Schema ValidatorsRuntime Type Guards
    View on GitHub↗3,868
  • hapijs/joihapijs avatar

    hapijs/joi

    21,192View on GitHub↗

    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

    Joi is a comprehensive, code-first schema validation library that provides a fluent API for defining complex, nested data structures with robust support for runtime validation, sanitization, and detailed error reporting.

    JavaScriptRecursive Validation Engines
    View on GitHub↗21,192
  • jquense/yupjquense avatar

    jquense/yup

    23,673View on GitHub↗

    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

    Yup is a declarative, code-first schema validation library that provides type-safe definitions, runtime validation, and robust support for nested objects and detailed error reporting.

    TypeScriptValidation Error HandlersSchema Validation Libraries
    View on GitHub↗23,673
  • go-ozzo/ozzo-validationgo-ozzo avatar

    go-ozzo/ozzo-validation

    4,072View on GitHub↗

    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

    This library provides a declarative, code-first approach to data validation in Go, supporting nested structures and custom validation rules without relying on struct tags.

    GoRecursive Validation EnginesValidation Error HandlersValidation Error Formatters
    View on GitHub↗4,072
  • open-circle/valibotopen-circle avatar

    open-circle/valibot

    8,769View on GitHub↗

    Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.

    Valibot is a modular, code-first schema validation library that provides type-safe definitions and runtime validation for TypeScript, fitting the core requirements for declarative data structure management.

    TypeScriptType-Safe Schema ValidationsRuntime Type GuardsJSON-Schema
    View on GitHub↗8,769
  • sideway/joisideway avatar

    sideway/joi

    21,192View on GitHub↗

    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

    Joi is a comprehensive, code-first validation library that allows you to define complex, nested data schemas with a fluent interface and provides robust runtime validation and error reporting.

    JavaScriptData Schema ValidationData Validation SchemasData Schema Definitions
    View on GitHub↗21,192
  • epoberezkin/ajvepoberezkin avatar

    epoberezkin/ajv

    14,748View on GitHub↗

    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

    Ajv is a high-performance JSON Schema validator that allows you to define data structures and validation rules declaratively, providing robust runtime validation, nested object support, and detailed error reporting.

    TypeScriptData Schema ValidationJSON Schema ValidationJust-in-Time Compilers
    View on GitHub↗14,748
  • marshmallow-code/marshmallowmarshmallow-code avatar

    marshmallow-code/marshmallow

    7,239View on GitHub↗

    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

    Marshmallow is a declarative, schema-based library for Python that provides robust tools for defining data structures, performing runtime validation, and handling nested objects with detailed error reporting.

    PythonPython Serialization LibrariesComplex Data SerializationData Validation
    View on GitHub↗7,239
  • arktypeio/arktypearktypeio avatar

    arktypeio/arktype

    7,780View on GitHub↗

    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

    Arktype is a declarative, code-first validation library that provides type-safe schema definitions and high-performance runtime validation, perfectly matching the requirements for structured data validation in TypeScript.

    TypeScriptInput ValidationRuntime Data ValidationRuntime Type Validation
    View on GitHub↗7,780
  • cue-lang/cuecue-lang avatar

    cue-lang/cue

    6,147View on GitHub↗

    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

    CUE is a powerful, constraint-based language specifically designed for declarative schema definition and data validation, offering robust support for nested structures, type safety, and detailed error reporting.

    GoConstraint-Based Configuration LanguagesConstraint-Based Configuration LanguagesClosed Definition Schemas
    View on GitHub↗6,147
  • protobufjs/protobuf.jsprotobufjs avatar

    protobufjs/protobuf.js

    10,558View on GitHub↗

    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

    This library provides a robust way to define data structures and perform runtime validation using Protocol Buffers, offering both dynamic schema parsing and static type generation for TypeScript.

    JavaScriptProtocol Buffers
    View on GitHub↗10,558
  • protocolbuffers/protobufprotocolbuffers avatar

    protocolbuffers/protobuf

    71,359View on GitHub↗

    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

    Protocol Buffers is a schema-driven toolchain that allows you to define data structures declaratively and generate type-safe code for runtime validation and serialization across multiple languages.

    C++Protocol Buffers
    View on GitHub↗71,359
  • samchon/typiasamchon avatar

    samchon/typia

    5,837View on GitHub↗

    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

    Typia is a high-performance library that enables declarative, code-first data validation by transforming TypeScript types into optimized runtime validation functions, directly addressing the need for type-safe schema definition and validation.

    GoRuntime Validation
    View on GitHub↗5,837
  • typestack/class-validatortypestack avatar

    typestack/class-validator

    11,796View on GitHub↗

    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

    This library provides a declarative, decorator-based approach to defining validation rules and schema constraints for TypeScript classes, making it a direct fit for code-first data validation.

    TypeScriptClass Property ValidationData ValidationAdditional Property Filtering
    View on GitHub↗11,796
  • ent/entent avatar

    ent/ent

    17,110View on GitHub↗

    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

    Ent is a code-first entity framework that allows you to define complex data schemas and validation rules in Go, which are then used to generate type-safe clients and enforce constraints at both the application and database levels.

    GoDatabase ORMsCompile-Time Code GenerationDatabase Schema Migrations
    View on GitHub↗17,110
  • fastapi/sqlmodelfastapi avatar

    fastapi/sqlmodel

    18,137View on GitHub↗

    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-

    SQLModel allows you to define data structures and validation rules declaratively using Python type hints, serving as a robust tool for schema definition and runtime validation within the Python ecosystem.

    PythonData Schema DefinitionsDatabase ORMsObject-Relational Mapping
    View on GitHub↗18,137
  • keleshev/schemakeleshev avatar

    keleshev/schema

    2,943View on GitHub↗

    Schema validation just got Pythonic

    This library provides a declarative, code-first approach to defining data structures and performing runtime validation in Python, though it lacks the cross-language support requested.

    PythonData ValidationData Validation
    View on GitHub↗2,943
  • meteor-community-packages/meteor-simple-schemaMeteor-Community-Packages avatar

    Meteor-Community-Packages/meteor-simple-schema

    915View on GitHub↗

    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

    This library provides a declarative way to define schemas and perform runtime validation for JavaScript objects, though it is specifically designed for the Meteor ecosystem rather than being a general-purpose, cross-language tool.

    JavaScriptRecursive Validation Engines
    View on GitHub↗915
  • spatie/data-transfer-objectspatie avatar

    spatie/data-transfer-object

    2,226View on GitHub↗

    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

    This library provides a declarative, code-first approach to defining data structures in PHP with built-in support for type safety, nested objects, and runtime validation.

    PHPType-Safe Structured Data FrameworksAttribute Metadata AnnotationsData Transfer Objects
    View on GitHub↗2,226
  • plumatic/schemaplumatic avatar

    plumatic/schema

    2,462View on GitHub↗

    Clojure(Script) library for declarative data description and validation

    This library provides a declarative, code-first approach to defining data schemas and performing runtime validation in Clojure, directly addressing the core requirements for schema-based data integrity.

    ClojureData Validation
    View on GitHub↗2,462
  • schema-inspector/schema-inspectorschema-inspector avatar

    schema-inspector/schema-inspector

    503View on GitHub↗

    Schema-Inspector is a simple JavaScript object sanitization and validation module.

    This library provides a declarative, code-first approach to defining validation rules and sanitization for JavaScript objects, directly addressing the need for runtime schema enforcement.

    JavaScriptData Validation
    View on GitHub↗503
  • jsonrainbow/json-schemajsonrainbow avatar

    jsonrainbow/json-schema

    3,630View on GitHub↗

    JSON Schema for PHP

    This library provides a declarative way to define and validate JSON data structures against schemas in PHP, fulfilling the core requirement for runtime validation and nested object support.

    PHPValidation and Sanitization
    View on GitHub↗3,630
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
ianstormtaylor/superstruct7.1KTypeScriptMITOct 1, 2024
samuelcolvin/pydantic28KPythonMITJun 16, 2026
ajv-validator/ajv
14.7K
TypeScript
MIT
May 12, 2026
pydantic/pydantic26.9KPythonmitFeb 19, 2026
colinhacks/zod43KTypeScriptMITJun 13, 2026
sindresorhus/ow3.9KTypeScriptMITOct 16, 2025
hapijs/joi21.2KJavaScriptNOASSERTIONJun 12, 2026
jquense/yup23.7KTypeScriptMITJun 12, 2026
go-ozzo/ozzo-validation4.1KGomitMar 23, 2024
open-circle/valibot8.8KTypeScriptMITJun 21, 2026

Related searches

  • a library for validating data schemas
  • Schema modeling tool
  • a declarative database schema tool
  • Schema configuration interface
  • a schema validation library for data parsing
  • Schema definition languages
  • Data structure library
  • an open source database management system