typescript-json-schema
                                
                                
                                
                                    typescript-json-schema copied to clipboard
                            
                            
                            
                        Generate json-schema from your Typescript sources
Support `toJSON` method on objects is required for [accurate JS/TS to JSON translation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description). `toJSON` can define custom representation of any JS object wich may not match the object itself. If...
Hi, Here a small example : ``` interface Truc { name: string } interface Test { myKey: Record } ``` That gives : ``` { "type": "object", "properties": { "myKey":...
When an interface property is defined as `undefined`, the generated JSON schema produces `"type": "undefined"`, which is not a valid JSON schema type. Source: ```typescript interface Foo { bar: string;...
Using v0.53.1: ```typescript export interface Toggleable { enabled: boolean; } export type ScrewsUpSchemaConfig = Toggleable & {}; export type DoesNotGetEnabledPropConfig = Toggleable & { response: string; }; export interface Config...
Importing fails when `strictNullChecks === true`  
I have this code: ``` export interface AppHostManifest { /** * The ASAP Issuers. * * @uniqueItems true * @minItems 1 * @maxItems 50 * @items.type string * @items.minLength 2...
Given this test case: ```typescript interface TypeEqual { type: "=", value: string } interface TypeNotIn { type: "not in", value: string[] } type Types = TypeEqual | TypeNotIn; type WithMessage...
Hi, Here a simple example : ``` /** @pattern ^[0-9]+[smhdw]$ */ export type Duration = string interface Test { single: Duration multi: Duration[] } ``` When I convert to JSON...
Do you have [AJV if/then/else](https://ajv.js.org/keywords.html#ifthenelse) support? I didn't see it in the docs. That would be great for validating properties that have relationships.
``` /Users/thomas/Desktop/agnostic/node_modules/@types/mocha/index.d.ts (2514,13): Subsequent variable declarations must have the same type. Variable 'beforeEach' must be of type 'Lifecycle', but here has type 'HookFunction'. /Users/thomas/Desktop/agnostic/node_modules/@types/mocha/index.d.ts (2532,13): Subsequent variable declarations must have...