Use Redoc in HTML
To render API documentation in an HTML page, start with the template below and replace thespec-url value with the local file path or URL of your API description.
Open the HTML file in your browser to see the HTML documentation rendering.
Configure Redoc
Redoc is highly configurable, find a full list of configuration options on the dedicated page. To configure Redoc in HTML, add the property names to the HTML tag:Theme configuration
For theme configuration, supply options as a JSON string:Advanced options
The Redoc object
The Redoc object offers aninit function:
specOrSpecUrl: JSON object with OpenAPI definition or file name/URLoptions: See the configuration referenceelement: Target DOM elementcallback(optional): Called after rendering or on error
Self-host dependencies
- CDN
- Self-hosted