export type T = Partial<string> & Partial<{ prop1: string }>;
And I understand that in some cases it makes sense, but when different data formats are compared I need oneOf instead.
So is there any "smart" way to alter OpenAPI generation? So far I see only post-processing OpenAPIObject as a way to conditionally alter this behaviour
First, thank you for the great library!
I went through all related issues and PRs about but did not find anything :)
I have a case where
z.union()
is used not for different object structures but for object vs string:That generates OpenAPI like this:
Which ends up as
And I understand that in some cases it makes sense, but when different data formats are compared I need
oneOf
instead. So is there any "smart" way to alter OpenAPI generation? So far I see only post-processingOpenAPIObject
as a way to conditionally alter this behaviourThanks in advance!