Generate JSON schema and TypeScript interface for a model
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.
Option | Description |
---|---|
-m, --model <name> | Model name |
-f, --fields <fields> | Fields in format “name:type,age:number” |
-o, --output <directory> | Output directory for generated schemas |
-h, --help | Display help for command |
crud-schema
command, the following files will be generated:
crud
- Generate basic CRUD operationscrud-unified
- Generate a complete CRUD setupcrud-validation
- Generate validation schemas