tests/testthat/files/endpoints.R

#* @stuff
#* @more- stuff
#*
#* comments
function(req, res, forward){
  4
}

#* @get /test
#* @post /test
#* @more stuff
#' @param req roxygen2 params
#* hey
foo <- function(a, b, ..., req, res, forward){
  5
}

#* Not an API
#* @param things
foo <- function(req, res, forward){
  6
}

#* @post /
#* one line
function(req, res, forward){x <- 9; x + 1}

#* Spaces in between
#* @delete /

function(req, res, forward){
  x <- 10
  x + 2
}

#*@get nowhitespace
function(req, res, forward){
  14
}
trestletech/plumber documentation built on May 6, 2024, 6:17 p.m.