@rline/json
Version:
JSON Schema compiler
79 lines (45 loc) • 2.05 kB
Markdown
<div align="center">
<img src="https://raw.githubusercontent.com/rbrightline/common/refs/heads/main/libs/json/favicon.png" alt="Logo" width="200"/>
</div>
# @rline/json
JSON Compiler CLI
- JSON Schema compiler, compiles multiple schemas into a single portable schema file by resolving all references.
- Typescript type generator, generate types from json schemas. Supports, `allof`,`oneOf`, other complex JSON schema properties.
## Installation
```bash
pnpm add -g @rline/json
```
## Usage
Before using any command, the schema project must be initialized.
## Initialize Project
The following command creates a new JSON-Schema project has a `schema.config.json` file to configure project variables.
```shell
json init
```
### Schema Compiler
Compiles JSON-Schema files into a single portable schema file
```shell
json schema
```
### Example (Schema Compiler)
The compiled schema will be saved in the `output` directory provided in `schema.config.json`
```shell
json schema
```
### Typescript Compiler
The compiled type will be saved in the `output` directory provided in the `schema.config.json`
```shell
json tsc
```
## Documentation
Detailed documentation [Documentation](https://rbrightline.github.io/common/json/)
## Funding
Thank you for using `@puq/core` It's an open-source project, and maintaining it takes time and effort. If you find this library useful, please consider supporting its ongoing development. Your contributions help ensure that the project stays up-to-date, secure, and well-maintained.
[Instant Funding](https://cash.app/$puqlib)
### Your funding will go toward
- **Bug fixes and updates** to ensure compatibility with the latest versions of dependencies.
- **New features** that will make the library even more powerful.
- **Documentation** improvements to help users get the most out of [Your Library Name].
- **General maintenance** to keep the library running smoothly and securely.
Contact to the developer: [robert.brightline@gmail.com]
[Support the developer](https://cash.app/$puqlib)