-
-
Notifications
You must be signed in to change notification settings - Fork 548
Open
Description
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!
Metadata
Metadata
Assignees
Labels
No labels