View source: R/openapi_route.R
openapi_route | R Documentation |
This route facilitates serving the OpenAPI specs for your server, using either RapiDoc, Redoc or Swagger as a UI for it. This function does not help you describe your API - you have to provide the description for it yourself.
openapi_route(
spec,
root = "__docs__",
ui = c("rapidoc", "redoc", "swagger"),
...
)
spec |
The path to the json or yaml file describing your OpenAPI spec |
root |
The point from which you want to serve your UI from |
ui |
Either |
... |
Further arguments passed on to the ui functions (e.g. rapidoc::rapidoc_spec()) |
A Route object
Other Route constructors:
asset_route()
,
ressource_route()
,
shared_secret_route()
,
sizelimit_route()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.