Skip to main content

CRUD Validation Command

The crud-validation command generates validation schemas for a model in your zopio project. This helps ensure data integrity and validation across your application.

Usage

Options

Examples

Generate Zod validation schema for a User model

Generate Yup validation schema

Generate class-validator decorators

Generated Files

When you run the crud-validation command, validation schemas will be generated based on the specified library:

Zod Schema Example

Yup Schema Example

Class Validator Example

  • crud - Generate basic CRUD operations
  • crud-schema - Generate JSON schema and TypeScript interface
  • crud-unified - Generate a complete CRUD setup