Skip to content

Commit

Permalink
Redirect api.html to api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wkmor1 committed Sep 27, 2024
1 parent c5ea257 commit f04a0d3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions api.R
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,22 @@ function(res) {

}

#* @get /docs/api.html
function(res) {

res[["status"]] <- 303L
res[["setHeader"]]("Location", "/__docs__/")

}

#* @get /docs/dev/api.html
function(res) {

res[["status"]] <- 303L
res[["setHeader"]]("Location", "/__docs__/")

}

#* @get /__docs__
function(res) {

Expand Down Expand Up @@ -781,6 +797,8 @@ function(pr) {
spec$paths$`/docs/dev/articles/` <- NULL
spec$paths$`/docs/dev/reference/` <- NULL
spec$paths$`/docs/reference/` <- NULL
spec$paths$`/docs/api.html` <- NULL
spec$paths$`/docs/dev/api.html` <- NULL

set_description <- function(spec, path, description) {
spec$paths[[path]]$get$description <- description
Expand Down

0 comments on commit f04a0d3

Please sign in to comment.