openapi

Serves the HTTP surface of a reva deployment as an OpenAPI document, and a page that browses it.

Package
github.com/cs3org/reva/v3/internal/http/services/openapi
Source
internal/http/services/openapi · Go reference

Enable it

Add this table to the revad configuration file:

[http.services.openapi]
# settings below

Overview

Package openapi serves the HTTP surface of a reva deployment as an OpenAPI document, and a page that browses it.

It describes what the services actually declared rather than a document written alongside them: the routes are read back out of the router, so an endpoint cannot be served without appearing here, nor appear here without being served.

Configuration

KeyTypeDefaultDescription
titlestring"reva"Title names the deployment in the document. source
descriptionstring-Description is the prose shown above the endpoint list. source
urlstring-URL is the deployment’s external base URL, which the page uses as the server to send requests to. Empty leaves it to the browser’s origin. source
publicbool-Public serves the document without authentication. It is off by default: the document is an inventory of everything the deployment serves, which is not something to publish without meaning to. The page that browses it is always public, as it holds nothing of the deployment’s own and asks for credentials when the document needs them. source
ui_bundlestringdefaultUIBundleUIBundle is where the page loads its viewer from. It defaults to a fixed release on a public CDN, and a deployment without egress should point it at its own copy of swagger-ui-dist. source
ui_bundle_integritystringdefaultUIBundleIntegrityUIBundleIntegrity is the subresource integrity hash of UIBundle. The viewer runs in the deployment’s origin, next to the credentials of whoever opens it, so the browser refuses a bundle that does not match. It defaults to the hash of the default bundle, and only to that. source
ui_stylesheetstringdefaultUIStylesheetUIStylesheet is the viewer’s stylesheet, alongside UIBundle. source
ui_stylesheet_integritystringdefaultUIStylesheetIntegrityUIStylesheetIntegrity is the subresource integrity hash of UIStylesheet, as UIBundleIntegrity is of UIBundle. source