ts-json-schema-generator
ts-json-schema-generator copied to clipboard
Generate JSON schema from your Typescript sources
I have some objects with parent-child relationships, so I'm using Symbols to store the parent relationships. That way, the parent property will be automatically skipped when serializing to JSON. ```...
Most validation keywords apply to only one of the basic types, so a "string" type and an "array" type can share a definition without colliding as a ["string", "array"] type,...
This is an implementation for resolving #666, valid TypeScript programs that the schema-generator cannot handle due to "multiple-instances" in schema error.
While working on #891, I'm not sure what I should and should not do for `NamedParameters`. It does not seem to be described in the README. Is there any documentation...
This reproduces the issue described in #952 where recursive mapped types that operate over definitions containing a union will produce an incorrect schema.
Define two types as follows: ``` export type MyType = { prop1?: string prop2?: string } export type MyRequiredType = Required ``` Expected to see the json schema generated to...
ts-json-schema-generator cannot schema from create extended class. See below, Example source code ```ts export class TypeA { public name: string; constructor() { this.name = 'hello'; } } export class TypeB...
if interfaces are not directly exported, they are not considered in the schema This code is well working ``` export default interface A {...} export interface B {...} ``` This...
Currently if JSDoc annotations can’t be parsed, they are silently ignored. https://github.com/vega/ts-json-schema-generator/blob/76deba14de3fa29e7798a41627730cb0c6f459d8/src/AnnotationsReader/BasicAnnotationsReader.ts#L98-L104 I suggest to add an option to throw on invalid annotations.