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"),
...
)
A Route object
The path to the json or yaml file describing your OpenAPI spec
The point from which you want to serve your UI from
Either "rapidoc"
, "redoc"
or "swagger"
, setting which UI to
use
Further arguments passed on to the ui functions (e.g. rapidoc::rapidoc_spec())
Other Route constructors:
asset_route()
,
resource_route()
,
shared_secret_route()
,
sizelimit_route()