if (FALSE) {
# Set the API Spec to a function to use the auto-generated OAS object
pr() %>%
pr_set_api_spec(function(spec) {
spec$info$title <- Sys.time()
spec
}) %>%
pr_get("/plus//", function(a, b) { a + b }) %>%
pr_run()
# Set the API Spec using an object
pr() %>%
pr_set_api_spec(my_custom_object) %>%
pr_get("/plus//", function(a, b) { a + b }) %>%
pr_run()
}
Run the code above in your browser using DataLab