difficulty: intermediateeffort: mediumhelp wantedtheme: plumb() :sparkles:type: enhancement
Description
Currently, annotations appear only to support single-line descriptions. For example, using the quickstart example with a lengthened @param field that is split across two lines:
# example.R
#* Echo the parameter that was sent in
#* @param msg The message to echo back. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
#* sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
#* @get /echo
function(msg=""){
[list](https://rdrr.io/r/base/list.html)(msg = [paste0](https://rdrr.io/r/base/paste.html)("The message is: '", msg, "'"))
}
plumber::pr("example.R") |>
plumber::pr_set_docs("swagger") |>
plumber::pr_run()
...results in the parameter documentation for msg being cut off at the end of the first line:
The message to echo back. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
The same thing occurs with redoc:
library(redoc)
plumber::pr("example.R") |>
plumber::pr_set_docs("redoc") |>
plumber::pr_run()
The expected behaviour is for multi-line annotations to render the entire text, in the same way that roxygen documentation works. I've tried various levels of indentation for the second line, as well as adding \n to the first line, but it's always cut off.
I'm not sure whether this can be handled in plumber without upstream changes in swagger (etc.).