Title: | Generates 'RapiDoc' Documentation from an 'OpenAPI' Specification |
---|---|
Description: | A collection of 'HTML', 'JavaScript', 'CSS' and fonts assets that generate 'RapiDoc' documentation from an 'OpenAPI' Specification: <https://mrin9.github.io/RapiDoc/>. |
Authors: | Bruno Tremblay [aut, cre], Barret Schloerke [ctb] , Mrinmoy Majumdar [cph] |
Maintainer: | Bruno Tremblay <[email protected]> |
License: | MIT + file LICENSE |
Version: | 9.3.4 |
Built: | 2024-11-21 04:50:02 UTC |
Source: | https://github.com/meztez/rapidoc |
RapiDoc is a collection of HTML, JavaScript, CSS and fonts assets that generate RapiDoc documentation from an OpenAPI Specification.
The main purpose of this package is to enable package authors to create APIs that are compatible with https://mrin9.github.io/RapiDoc/ and https://www.openapis.org/.
To learn more about RapiDoc visit: https://mrin9.github.io/RapiDoc/
Maintainer: Bruno Tremblay [email protected]
Other contributors:
Barret Schloerke [email protected] (ORCID) [contributor]
Mrinmoy Majumdar [email protected] [copyright holder]
Useful links:
Retrieves the path to the rapidoc index file.
rapidoc_index()
rapidoc_index()
## Not run: if (interactive()) { browseURL(rapidoc_index()) } else { print(paste("You can use rapidoc under: ", rapidoc_index())) } ## End(Not run)
## Not run: if (interactive()) { browseURL(rapidoc_index()) } else { print(paste("You can use rapidoc under: ", rapidoc_index())) } ## End(Not run)
Retrieves the path to rapidoc resources.
rapidoc_path()
rapidoc_path()
## Not run: if (interactive()) { browseURL(rapidoc_path()) } else { print(paste("You can explore rapidoc resources under: ", rapidoc_path())) } ## End(Not run)
## Not run: if (interactive()) { browseURL(rapidoc_path()) } else { print(paste("You can explore rapidoc resources under: ", rapidoc_path())) } ## End(Not run)
Produces the content for a index.html
file that will attempt to access a
provided OpenAPI Specification URL.
rapidoc_spec( spec_url = "https://petstore.swagger.io/v2/swagger.json", fonts_css = "./fonts.css", slots = character(), ... )
rapidoc_spec( spec_url = "https://petstore.swagger.io/v2/swagger.json", fonts_css = "./fonts.css", slots = character(), ... )
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. |
large string containing the contents of rapidoc_index()
with
the appropriate specification path changed to the spec_url
value.
## Not run: if (interactive()) { slot1 <- ' <img slot="logo" src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" width=36px/>' rapidoc_spec("https://petstore.swagger.io/v2/swagger.json", fonts_css = "./fonts.css", slots = c(slot1), heading_text = "Google", allow_server_selection = FALSE) } ## End(Not run)
## Not run: if (interactive()) { slot1 <- ' <img slot="logo" src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" width=36px/>' rapidoc_spec("https://petstore.swagger.io/v2/swagger.json", fonts_css = "./fonts.css", slots = c(slot1), heading_text = "Google", allow_server_selection = FALSE) } ## End(Not run)