Describe the bug
When using api schema that use arrays nested in an anyOf, it takes the last element of the anyOf.
Here is the schema I'm using:
"Payload": {
"title": "Payload",
"required": [
"values"
],
"type": "object",
"properties": {
"values": {
"title": "Values",
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/VisualizationValue"
},
{
"$ref": "#/components/schemas/GroupValue"
},
...(long union)
]
}
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Query"
}
}
]
}
}
},
It will output the following type:
export type ParsePayload = {
terms: Array<(Query)>;
};
What I would expect is:
export type ParsePayload = {
terms: Array<VisualizationValue | GroupValue | ...> | Array<(Query)>;
};
Let me know if there are any other details I can add to help - thank you for all your work on this amazing project!
Describe the bug
When using api schema that use arrays nested in an
anyOf, it takes the last element of theanyOf.Here is the schema I'm using:
It will output the following type:
What I would expect is:
Let me know if there are any other details I can add to help - thank you for all your work on this amazing project!