# vega/ts-json-schema-generator

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/vega-ts-json-schema-generator).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

1,708 stars · 235 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/vega/ts-json-schema-generator
- awesome-repositories: https://awesome-repositories.com/repository/vega-ts-json-schema-generator.md

## Topics

`compiler` `generator` `json-schema` `typescript`

## Description

Ts-json-schema-generator is a command-line tool and Node.js library that automatically generates standard JSON validation schemas directly from TypeScript source files and type definitions. Operating as a static code analyzer and schema compilation engine, it inspects type definitions and interfaces to understand structural data shapes without requiring runtime execution. It uses static program analysis by initializing a virtual compiler instance to resolve complex generic types, imports, and type relationships across source files.

The project translates extracted types into standard validation specifications through an AST-based type inspection and transformation pipeline. It provides extensibility through a formatter plugin system that intercepts the serialization of specific structural types, alongside custom syntax parser extensions that enable the interpretation of non-standard code constructs by plugging custom parsing rules directly into the early code analysis phase.

Users can operate the software via a declarative command-line interface using path glob patterns and configuration flags, or embed the generation routines programmatically within custom scripts and server programs. Additional configuration options allow direct control over compiler settings, custom parsing rules, and specialized schema output formatting.

## Tags

### Artificial Intelligence & ML

- [Schema Generators from Types](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-tool-calling/schema-generators-from-types.md) — Extracts data structures directly from source code and compiles them into standard validation specifications. ([source](https://github.com/vega/ts-json-schema-generator#readme))

### Data & Databases

- [Schema Compilers](https://awesome-repositories.com/f/data-databases/schema-validation-libraries/schema-compilers.md) — Translates application type definitions into standardized validation documents as a schema compilation engine.
- [Custom Data Type Providers](https://awesome-repositories.com/f/data-databases/custom-data-types/custom-data-type-providers.md) — Extends the transformation pipeline by registering custom formatters and parsers for specialized data structures. ([source](https://github.com/vega/ts-json-schema-generator#readme))

### Programming Languages & Runtimes

- [Schema Transformation Pipelines](https://awesome-repositories.com/f/programming-languages-runtimes/multi-pass-compiler-pipelines/schema-transformation-pipelines.md) — Translates internal AST representations into standard validation documents through a modular transformation pipeline.
- [Library Wrappers](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-network-libraries/library-wrappers.md) — Runs schema generation routines programmatically inside custom Node.js scripts without relying on command-line wrappers.
- [Code Generators](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-network-libraries/node-js-assertion-libraries/code-generators.md) — Executes schema generation routines programmatically within custom Node.js scripts and server programs. ([source](https://github.com/vega/ts-json-schema-generator#readme))
- [Custom Type Schema Mappings](https://awesome-repositories.com/f/programming-languages-runtimes/json-schema-converters/json-schema-generators/type-to-schema-generation/custom-type-schema-mappings.md) — Defines custom schema output rules for specific data structures by registering supplementary formatters into the pipeline. ([source](https://github.com/vega/ts-json-schema-generator/blob/next/README.md))

### Security & Cryptography

- [TypeScript Type-to-JSON Schema Generators](https://awesome-repositories.com/f/security-cryptography/input-validation-schemas/type-derived-json-schemas/typescript-type-to-json-schema-generators.md) — Builds standard JSON schema documents automatically from source files and type definitions without manual maintenance. ([source](https://github.com/vega/ts-json-schema-generator/blob/next/README.md))

### Software Engineering & Architecture

- [Tree Type Inspection](https://awesome-repositories.com/f/software-engineering-architecture/abstract-syntax-tree-tools/internal-tree-representations/lossless-semantic-trees/tree-type-inspection.md) — Inspects source code structures directly into semantic tree types without requiring runtime execution.
- [Static Type Resolvers](https://awesome-repositories.com/f/software-engineering-architecture/static-type-resolvers.md) — Analyzes type relationships across source files by initializing a virtual compiler instance to resolve complex generic types.
- [Plugin System Extensions](https://awesome-repositories.com/f/software-engineering-architecture/plugin-system-extensions.md) — Intercepts the serialization of specific structural types through a customizable plugin formatting architecture.

### Testing & Quality Assurance

- [TypeScript Static Analysis](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/formatting-and-linting-pipelines/javascript-and-typescript-toolchains/typescript-linting-plugins/typescript-static-analysis.md) — Performs static analysis on TypeScript type definitions and interfaces to inspect structural data shapes without runtime execution.

### Development Tools & Productivity

- [Syntax Parser Interceptions](https://awesome-repositories.com/f/development-tools-productivity/custom-parser-definitions/syntax-parser-interceptions.md) — Interprets non-standard code constructs by plugging custom parsing rules directly into the early analysis phase.
- [Schema-to-Code CLI Generators](https://awesome-repositories.com/f/development-tools-productivity/documentation-generators/data-file-generators/command-line-generators/schema-to-code-cli-generators.md) — Executes build routines directly from the command line using path glob patterns and configuration flags.
- [Custom Parsing Rules](https://awesome-repositories.com/f/development-tools-productivity/syntax-definitions/custom-parsing-rules.md) — Interprets non-standard code constructs into recognizable types by adding custom parser rules during analysis. ([source](https://github.com/vega/ts-json-schema-generator/blob/next/README.md))
