schema-maestro
v1.0.0
Published
A CLI tool for generating TypeScript interfaces and Mongoose models from JSON schema files.
Downloads
1
Readme
Schema Maestro
A CLI tool for generating TypeScript interfaces and Mongoose models from JSON schema files.
Installation
To install Schema Maestro, run:
npm install -g schema-maestro
yarn global add schema-maestro
Usage
To use Schema Maestro, run the following command:
schema-maestro [schemaPath] [targetType] [count]
Arguments
- schemaPath: The path to the JSON schema file.
- targetType: The target type to generate. This can be either interface or model.
- count: The number of entries to generate for the test-data target type. This argument is optional and defaults to 1.
Examples
- Generate a TypeScript interface from a JSON schema file:
schema-maestro ./path/to/schema.json interface
- Generate a Mongoose model from a JSON schema file:
schema-maestro ./path/to/schema.json model
- Generate test data from a JSON schema file:
schema-maestro ./path/to/schema.json test-data 5
Contributing
To contribute to Schema Maestro, fork the repository and create a pull request.
License
Schema Maestro is licensed under the MIT License. See LICENSE for more information.