schema-dsl
Simple and powerful JSON Schema validation library

DSL syntax · Chained API · Multi-format export · Full TypeScript support

schema-dsl logoschema-dsl logo

DSL syntax

Define validation rules using compact DSL strings or objects, covering common fields, constraints and combination scenarios.

High Performance Validation

Based on AJV 8 packaging, supports synchronous, asynchronous and batch validation, and provides cache management capabilities.

Multi-format export

The same schema can be exported to MongoDB, MySQL, PostgreSQL and Markdown documents.

Internationalization

Built-in multi-language error messages and dynamic locale switching, suitable for sharing validation rules between the server and front-end.

Extensions and plugins

Add custom DSL types, formats and packaged plugins.

TypeScript friendly

Provides complete type declarations for direct integration in modern Node.js and TypeScript projects.