callback
to tell where the API user interface is locatedR/pr_set.R
pr_set_ui_callback.Rd
When set, it will be called with a character string corresponding
to the API UI url. This allows RStudio to open swagger
UI when a
Plumber router pr_run()
method.
pr_set_ui_callback( pr, callback = getOption("plumber.ui.callback", getOption("plumber.swagger.url", NULL)) )
pr | A Plumber API. Note: The supplied Plumber API object will also be updated in place as well as returned by the function. |
---|---|
callback | a callback function for taking action on UI url. |
The Plumber router with the new UI callback setting.
If using options_plumber()
, the value must be set before initializing your Plumber router.