Support openapi 3.1 prefixItems
Description
When using tuples in pydantic in python, it generates openapi spec with prefixItems instead of items.
"point": {
"maxItems": 2,
"minItems": 2,
"prefixItems": [
{
"type": "number"
},
{
"type": "number"
}
],
"title": "Point",
"type": "array"
},
This should be converted to [number, number] in typescript, but is currently converted to any[] because prefixItems are not recognized.
Same should apply if the types in each position varies (e.g. [number, string]), of course 😄
@orhanhenrik thanks for adding this ticket. I will need to look more into the spec to understand the full details.
any updates on this? 😄
@Jesperpaulsen The update is you might just push me to add this if you keep pinging me 🤣 shouldn't take too long to add
Oh look, it worked. Try with v0.47.2. Note that it's an incomplete implementation, but it should suffice for the use case provided above. Let me know if you need it to work with other cases
That worked like a charm! Thanks a lot @mrlubos 🤠
Works perfectly for our use case, thank you! 🙌
Thank you so much for fixing this! 👏🏻
Forgot to update here, this is supported in the experimental parser :tada: