Learn R Programming

rapidoc (version 9.3.4)

rapidoc_spec: RapiDoc Index File with OpenAPI Path

Description

Produces the content for a index.html file that will attempt to access a provided OpenAPI Specification URL.

Usage

rapidoc_spec(
  spec_url = "https://petstore.swagger.io/v2/swagger.json",
  fonts_css = "./fonts.css",
  slots = character(),
  ...
)

Value

large string containing the contents of rapidoc_index() with the appropriate specification path changed to the spec_url value.

Arguments

spec_url

Url to an OpenAPI specification

fonts_css

Path to the fonts css file if you want to use fonts other than the default one.

slots

HTML content to include between `<rapi-doc>` and `</rapi-doc>`

...

Other options recognized by RapiDoc inside the `rapi-doc` tag. You can replace `-` by underscore in names. See https://mrin9.github.io/RapiDoc/api.html for a list of available options.

Examples

Run this code
if (FALSE) {
if (interactive()) {
  slot1 <- '
  '
  rapidoc_spec("https://petstore.swagger.io/v2/swagger.json",
               fonts_css = "./fonts.css",
               slots = c(slot1),
               heading_text = "Google",
               allow_server_selection = FALSE)
}
}

Run the code above in your browser using DataLab