ts-json-schema-generator icon indicating copy to clipboard operation
ts-json-schema-generator copied to clipboard

Throw if JSDoc annotations can’t be parsed

Open remcohaszing opened this issue 4 years ago • 3 comments

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.

remcohaszing avatar Jul 26 '21 12:07 remcohaszing

I don't think we need an option but we could throw an error by default.

domoritz avatar Jul 26 '21 13:07 domoritz

I would like that, but that would make it a beaking change.

remcohaszing avatar Jul 26 '21 13:07 remcohaszing

We are pre 1.0 so breaking changes are ok. I try to avoid breaking changes that affect a lot of people.

domoritz avatar Jul 26 '21 13:07 domoritz