-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
Hi all,
we need to make use of the "hideDefintions" flag in order to get nested types being output correctly in our final spec file. The functionality itself works, however the "hideDefintions" flag appears in the final spec causing the issue to pop up when visualizing the swagger file (or when using cli-generators). Expectation would be that the flag does not appear in the final json file.
extendApi(
z.object({
hello: z.string(),
world: z.union(z.array(CustomTypeA), z.array(CustomTypeB)),
}),
{
hideDefinitions: ['world'],
properties: {
world: {
anyOf: [
{
type: 'array',
items: {
$ref: '#/components/schemas/CustomTypeA'
}
},
{
type: 'array',
items: {
$ref: '#/components/schemas/CustomTypeB'
}
}
]
}
}
}
);
Metadata
Metadata
Assignees
Labels
No labels
