Skip to main content

CRUD Schema Command

The crud-schema command generates JSON schema and TypeScript interface definitions for a model in your zopio project. This helps ensure type safety and data validation across your application.

Usage

Options

Examples

Generate schema for a User model

Generate schema with a custom output directory

Generated Files

When you run the crud-schema command, the following files will be generated:
  1. TypeScript Interface: A TypeScript interface for the model
  2. JSON Schema: A JSON schema definition for validation
  3. Schema Utils: Helper functions for working with the schema

Example TypeScript Interface

Example JSON Schema