The `rm-json-schema-to-typescript` package is a fork of the popular `json-schema-to-typescript` library, designed to compile JSON schemas into TypeScript interfaces and typings. Currently at version 10.2.0, this package offers modified reference resolving behavior compared to its upstream counterpart. Its development status is tied to the original project, with an explicit intention to be deprecated once the core changes implemented in this fork are accepted into the main `json-schema-to-typescript` repository. As a fork, its release cadence is likely reactive to critical fixes or its specific feature set rather than a strict schedule. It aims to provide a drop-in replacement where its altered reference resolution is beneficial, but users should be aware of its temporary nature and plan for eventual migration.
npm install rm-json-schema-to-typescriptVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to compile a JSON schema object into a TypeScript interface using the `compile` function, and how it writes the output to a file.
Monitor the original `json-schema-to-typescript` project for updates that incorporate the `rm-json-schema-to-typescript` fork's features. If no upstream merge occurs, consider migrating to another active JSON Schema to TypeScript solution or maintaining a custom fork.
Thoroughly review generated TypeScript types if migrating from or to the original `json-schema-to-typescript` package, especially for schemas with external or complex internal `$ref`erences. Test the output against expected type definitions.
When installing via npm as `rm-json-schema-to-typescript`, ensure your import statements in code use `import { ... } from 'json-schema-to-typescript'` as per the documentation. If issues arise, explicitly check your project's module resolution settings or the `package.json` `exports` field of the installed package.Ensure `rm-json-schema-to-typescript` is correctly installed. Based on the documentation, try `import { compile } from 'json-schema-to-typescript'` even if you installed the `rm-` prefixed package. Verify your `tsconfig.json` or module resolution settings if problems persist.Validate your JSON Schema against the JSON Schema specification (e.g., using a linter or online validator) to ensure it is correctly structured. Check the file path for `compileFromFile`.
Review the `$ref` definitions in your JSON schema for circular dependencies. If using external `$ref`s, ensure the `cwd` option in `compile` or `compileFromFile` options correctly points to the base directory for resolution.
No dependency data recorded yet.