JSPM

  • Created
  • Published
  • Downloads 439
  • Score
    100M100P100Q88318F
  • License GPL-3.0-or-later

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.

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.

    npm version commitizen friendly styled with prettier Libraries.io dependency status for latest release, scoped npm package npm NPM

    Installation

    Add the package to your workspace:

    yarn add @rxap/json-schema-to-typescript

    Execute the init generator:

    yarn nx g @rxap/json-schema-to-typescript:init

    Generators

    init

    Initialize the package in the workspace

    nx g @rxap/json-schema-to-typescript:init

    generate

    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