Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rxap/json-schema-to-typescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Generate TypeScript interfaces from JSON Schema definitions. It allows you to programmatically create and manipulate TypeScript interface definitions based on JSON schema inputs. The package provides utilities to convert JSON schema to TypeScript interfaces, handle references, and manage imports.
Installation
Add the package to your workspace:
yarn add @rxap/json-schema-to-typescriptExecute the init generator:
yarn nx g @rxap/json-schema-to-typescript:initGenerators
init
Initialize the package in the workspace
nx g @rxap/json-schema-to-typescript:initgenerate
Generate a typescript interface for a given json schema
nx g @rxap/json-schema-to-typescript:generate| Option | Type | Default | Description |
|---|---|---|---|
| path | string | Path to the json schema file | |
| output | string | Path to the output typescript file. Defaults to the filename of the json schema where .json is replaced by .d.ts | |
| suffix | string | Suffix of the generate interface name |