The issue is that Retool treats the array of objects as a singular object only. Only a single input is expected, and when the request is sent, the body is a single JSON object instead of an array. That in turn causes the request to fail since the API expects an array containing objects.
Thank you, I appreciate the transparency.
I haven't actually tried anything yet (low prio feature), but I'm sure I'll find a way around it for the time being
Yeah, sorry for not updating. You can work around this by adding the same resource as a plain REST API, and for the batch endpoints for which array fields don't work, you can construct the URL manually and use something like the following:
This also affects us, and is an important use-case. Adding additional resources is a fine temporary workaround, but obviously isn't an acceptable long term solution. I'd love to better understand what areas of the openapi spec are and are not current supported, and where fixing this sits on the roadmap.
Definitely valid. We support arrays in the Open API resource, just not as a top level type for requestBody, but we have an internal request to support this! It's not currently on our roadmap (so we probably can't expect a fix in the next few months), but we're constantly adjusting our roadmap to accommodate for high-impact requests. You adding your context above is already very insightful!
@Elliott@clarkmcc@kim I'm working on a change that would allow you to enter any request body you want when we don't support the request body schema with our UI. It is akin to the RAW mode that @kim suggested above. Please let me know if this sounds good to you:
That change makes sense and looks like it would handle our use-case. What versions of Retool has this been added to? I'm specifically using self-hosted retool.