Skip to content

Documenting which API inputs come from req.query vs req.body #804

Answered by RobinTail
TheWisestOne asked this question in Q&A
Discussion options

You must be logged in to vote

Well...
Currently it works the following way.
There is a distribution of inputSources which you can override in config.

  1. The documentation generator can recognize the properties from the Endpoint's assigned path. In this case, if params is among the sources, it sets in: path.
  2. If body is among sources (like for the POST method), it sets requestBody.
  3. In other cases it sets in: query.

So it actually depicts the location of the parameters. Here are the reasons for this setup:

  1. I find it beneficial that inputs are combined from the configured input sources, but
  2. In encourages you to use a single channel for all your parameters.
  3. I find it confusing that in POST request you have some parameters in

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TheWisestOne
Comment options

Answer selected by RobinTail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
wontfix This will not be worked on
2 participants