diff --git a/test/programs/type-aliases-partial/schema.json b/test/programs/type-aliases-partial/schema.json index 71cd3457..de8e7901 100644 --- a/test/programs/type-aliases-partial/schema.json +++ b/test/programs/type-aliases-partial/schema.json @@ -15,6 +15,7 @@ "definitions": { "__type": { "type": "object", + "description": "Make all properties in T optional", "properties": { "x": { "type": "number" @@ -29,6 +30,7 @@ }, "__type_1": { "type": "object", + "description": "Make all properties in T optional", "properties": { "a": { "type": "number" diff --git a/test/programs/type-recursive/schema.json b/test/programs/type-recursive/schema.json index dd0ee49f..d2a59a30 100644 --- a/test/programs/type-recursive/schema.json +++ b/test/programs/type-recursive/schema.json @@ -22,7 +22,9 @@ }, "type": "array" } - ] + ], + "description": "A recursive type" } - } + }, + "description": "A recursive type" } diff --git a/typescript-json-schema.ts b/typescript-json-schema.ts index c9ca9d8d..92742981 100644 --- a/typescript-json-schema.ts +++ b/typescript-json-schema.ts @@ -1197,6 +1197,7 @@ export class JsonSchemaGenerator { const otherAnnotations = {}; this.parseCommentsIntoDefinition(reffedType!, definition, otherAnnotations); // handle comments in the type alias declaration this.parseCommentsIntoDefinition(symbol!, definition, otherAnnotations); + this.parseCommentsIntoDefinition(typ.aliasSymbol!, definition, otherAnnotations); if (prop) { this.parseCommentsIntoDefinition(prop, returnedDefinition, otherAnnotations); }