Title: | Dynamically Generates Documentation from a 'Swagger' Compliant API |
---|---|
Description: | A collection of 'HTML', 'JavaScript', and 'CSS' assets that dynamically generate beautiful documentation from a 'Swagger' compliant API: <https://swagger.io/specification/>. |
Authors: | Barret Schloerke [aut] , Javier Luraschi [aut], Bruno Tremblay [cre, ctb], RStudio [cph], SmartBear Software [aut, cph] |
Maintainer: | Bruno Tremblay <[email protected]> |
License: | Apache License 2.0 | file LICENSE |
Version: | 5.17.14.1 |
Built: | 2024-11-20 05:20:36 UTC |
Source: | https://github.com/rstudio/swagger |
Swagger is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
The main purpose of this package is to enable package authors to create APIs that are compatible with https://swagger.io/ and https://www.openapis.org/.
To learn more about Swagger visit: https://swagger.io/swagger-ui/
Maintainer: Bruno Tremblay [email protected] [contributor]
Authors:
Barret Schloerke [email protected] (ORCID)
Javier Luraschi [email protected]
SmartBear Software [copyright holder]
Other contributors:
RStudio [copyright holder]
Useful links:
Report bugs at https://github.com/rstudio/swagger/issues
Retrieves the path to the swagger index file.
swagger_index(version = "5")
swagger_index(version = "5")
version |
Major version number to be used for Swagger UI. Currently version |
if (interactive()) { browseURL(swagger_index()) } else { print(paste("You can use swagger under: ", swagger_index())) }
if (interactive()) { browseURL(swagger_index()) } else { print(paste("You can use swagger under: ", swagger_index())) }
Retrieves the path to swagger resources.
swagger_path(version = "5")
swagger_path(version = "5")
version |
Major version number to be used for Swagger UI. Currently version |
if (interactive()) { browseURL(swagger_path()) } else { print(paste("You can explore swagger resources under: ", swagger_path())) }
if (interactive()) { browseURL(swagger_path()) } else { print(paste("You can explore swagger resources under: ", swagger_path())) }
Produces the content for a index.html
file that will attempt
to access a provided API path.
swagger_spec( api_path = "\"http://petstore.swagger.io/v2/swagger.json\"", version = "5" )
swagger_spec( api_path = "\"http://petstore.swagger.io/v2/swagger.json\"", version = "5" )
api_path |
Path to paste into the an OpenAPI specification file |
version |
Major version number to be used for Swagger UI. Currently version |
large string containing the contents of swagger_index()
with
the appropriate specification path changed to the api_path
value.
if (interactive()) { swagger_spec("https://developer.uspto.gov/ibd-api/swagger.json") }
if (interactive()) { swagger_spec("https://developer.uspto.gov/ibd-api/swagger.json") }