You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is indeed an interesting use-case. From glancing over the code it seems the current implementation expected the allOf prop to be used for merging only.
The implementation currently expects complete types and then create an intersection of those, while what you're demonstrating here could be considered more like create a completely new type.
Implementation-wise I'd try to refactor this to first merge the schemas and then create the typescript interface from that.
The output would then probably just look like this for your example
The AST generator seems ignoring
allOf
usage when it comes to merging definition (and not distinct types)My use case is well described in this article and address the need to make some optional properties required.
Using the example from the article :
Generated :
Expected (or something like that):
The text was updated successfully, but these errors were encountered: