ts-json-schema-generator
ts-json-schema-generator copied to clipboard
Generate JSON schema from your Typescript sources
Hi, Great library! I think I've found a limitation that you cannot use enums and unions as an index for a Record type. ## Repro: ### Union ```typescript type Variant...
# Input ```ts type A = { /** * Must start with a capital letter. * @pattern ^[A-Z]+[a-zA-Z0-9.]*$ */ name: string; package: "A" | "B" | "C"; } export type...
Add support for using enums and union types as indexes on record types. fixes #2164
I would like support for: ``` export interface IPageSizeConfig { /** * @description The number of records to return in a single page. * @asType number | string */ page_size?:...
Hello, first of all thanks for the great library. Now I'm having an issue I don't understand I have class that has a property called fn, this property is an...
I have a type like this: ``` export type List = { [index: number]: T }; ``` The generator writes it like this (for List): ``` { "additionalProperties": { "$ref":...
When i try to create schema from a type that uses `NoInfer` i get this error: ``` Unknown intrinsic method: NoInfer ```
Mapped types in TypeScript accept Unions as the constraint type, and the resulting output (in TS) will be similar to [Distributive Conditional Types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types). Take the following code, for example: ```typescript...