-
-
Notifications
You must be signed in to change notification settings - Fork 168
zod array objects break this #391
Comments
I believe this happens because there is no "default" way to pass an array of values as a query parameter. It might work for tRPC, but there's no easy widely adopted method of passing arrays as a query parameter and most implementations are framework specific. Which one of the following endpoints should even be generated?
I suggest using a POST request instead and passing everything in the body. Alternatively, you can make "labels" into a string, and parse it manually (using the format you chose) inside the procedure. But that's a bit weird IMO. |
I've also been unable to use arrays in inputs for PUT. See #255 |
+1 |
@Pridestalkerr
It kind of defeats the purpose of generating the openapi spec, doesn't it? If the document generated is not representing what is expected by the implementing code, what is it good for then? |
@renke0 some clarifications. Please, do take this with a grain of salt. It's just what i learned back when I encountered this issue myself. |
heres' an example:
if I have this code defining a schema and try to make TRPC calls (on ANY API, not just this one), I'll get this error:
The text was updated successfully, but these errors were encountered: