Type: | Package |
Title: | Generates 'Redoc' Documentation from an 'OpenAPI' Specification |
Version: | 2.0.0.75 |
Maintainer: | Bruno Tremblay <openr@neoxone.com> |
Description: | A collection of 'HTML', 'JavaScript', 'CSS' and fonts assets that generate 'Redoc' documentation from an 'OpenAPI' Specification: https://redocly.com/redoc/. |
License: | MIT + file LICENSE | Apache License 2.0 |
Imports: | jsonlite |
Suggests: | plumber (≥ 1.0), testthat (≥ 3.0.0) |
Encoding: | UTF-8 |
URL: | https://github.com/meztez/redoc |
BugReports: | https://github.com/meztez/redoc/issues |
RoxygenNote: | 7.2.3 |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2023-11-17 18:58:53 UTC; bruno |
Author: | Bruno Tremblay [aut, cre],
Barret Schloerke |
Repository: | CRAN |
Date/Publication: | 2023-11-17 19:20:03 UTC |
redoc: Generates Redoc documentation from an OpenAPI Specification
Description
Redoc is a collection of HTML, JavaScript, CSS and fonts assets that generate Redoc documentation from an OpenAPI Specification.
Details
The main purpose of this package is to enable package authors to create APIs that are compatible with https://redocly.com/redoc/ and https://www.openapis.org/.
To learn more about Redoc visit: https://redocly.com/redoc/
Author(s)
Maintainer: Bruno Tremblay openr@neoxone.com
Authors:
Rebilly [copyright holder]
Other contributors:
Barret Schloerke barret@rstudio.com (ORCID) [contributor]
See Also
Useful links:
Path to Redoc Index
Description
Retrieves the path to the redoc index file.
Usage
redoc_index()
Examples
## Not run:
if (interactive()) {
browseURL(redoc_index())
} else {
print(paste("You can use redoc under: ", redoc_index()))
}
## End(Not run)
Path to Redoc Resources
Description
Retrieves the path to redoc resources.
Usage
redoc_path()
Examples
## Not run:
if (interactive()) {
browseURL(redoc_path())
} else {
print(paste("You can explore redoc resources under: ", redoc_path()))
}
## End(Not run)
Redoc 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
redoc_spec(spec_url = "https://redocly.github.io/redoc/openapi.yaml", ...)
Arguments
spec_url |
Url to an OpenAPI specification |
... |
Additional options for Redoc. See https://github.com/Redocly/redoc#redoc-options-object |
Value
large string containing the contents of redoc_index()
with
the appropriate specification path changed to the spec_url
value.
Examples
## Not run:
if (interactive()) {
redoc_spec("https://docs.docker.com/engine/api/v1.38.yaml",
scrollYOffset = 250,
disableSearch = TRUE)
}
## End(Not run)