Package 'redoc'

Title: Generates 'Redoc' Documentation from an 'OpenAPI' Specification
Description: A collection of 'HTML', 'JavaScript', 'CSS' and fonts assets that generate 'Redoc' documentation from an 'OpenAPI' Specification: <https://redocly.com/redoc/>.
Authors: Bruno Tremblay [aut, cre], Barret Schloerke [ctb] , Rebilly [aut, cph]
Maintainer: Bruno Tremblay <[email protected]>
License: MIT + file LICENSE | Apache License 2.0
Version: 2.0.0.75
Built: 2024-11-11 02:58:17 UTC
Source: https://github.com/meztez/redoc

Help Index


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 [email protected]

Authors:

  • Rebilly [copyright holder]

Other contributors:

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)