YousefED / typescript-json-schema

Generate json-schema from your Typescript sources
BSD 3-Clause "New" or "Revised" License
3.17k stars 323 forks source link

Single union case shouldn't overwrite existing properties #550

Closed jwatzman closed 1 year ago

jwatzman commented 1 year ago

In the case of a single union, we were just copying all properties across. This can overwrite a pre-existing field, in particular a more-specific description that has been specified on some including type.

This came up in a project where enabling strictNullChecks caused a bunch of descriptions to change for seemingly no reason.

Please: