Documenting which API inputs come from req.query
vs req.body
#804
-
When defining an We use express-zod-api to auto-generate API docs for our APIs, and I'm wondering if there's any way for us to specify (so the docs know) which params should come in as part of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Well...
So it actually depicts the location of the parameters. Here are the reasons for this setup:
Taking this into account, do you still want to split your parameters between |
Beta Was this translation helpful? Give feedback.
Well...
Currently it works the following way.
There is a distribution of
inputSources
which you can override in config.params
is among the sources, it setsin: path
.body
is among sources (like for the POST method), it setsrequestBody
.in: query
.So it actually depicts the location of the parameters. Here are the reasons for this setup: