Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Typescript JSON schema generatorNew to Visual Studio Code? Get it now.
Typescript JSON schema generator

Typescript JSON schema generator

Marco Q

|
29,220 installs
| (5) | Free
Create JSON schemas from typescript code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Typescript JSON schema generator

The extension uses ts-json-schema-generator to generate JSON schemas from Typescript sources.

Use the command "Generate JSON Schema for type..." to get a list of type definitions and interfaces on the page for which a JSON schema can be generated.

The generated schema is opened on a new document and can be saved from there.

Extension Settings

This extension contributes the following settings:

  • generateJSONSchema.expose: Types to include in the 'definitions' section of the JSON Schema.
  • generateJSONSchema.topRef: Include top reference.
  • generateJSONSchema.jsDoc: JsDoc description to include in JSON schema.
  • generateJSONSchema.sortProps: Sort properties in JSON schema.
  • generateJSONSchema.skipTypeCheck: Skip type checks for better performance.
  • generateJSONSchema.additionalProperties: Allow additional properties for objects that have no index signature.
  • generateJSONSchema.minify: Minify JSON schema
  • generateJSONSchema.strictTuples: Do not allow additional items on tuples.
  • generateJSONSchema.encodeRefs: According to the standard, references must be valid URIs but some tools do not support encoded references.

Known Issues

The JSON schema generation does not work for classes and conditional types.
File scheme generation issues with ts-json-schema-generator

Release Notes

See Change log

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft