Redoc CE offers multiple ways of rendering your OpenAPI description. Choose a method that best suits your needs.
Redoc CE supports the following rendering methods:
- Live demo: enables to see how your OpenAPI renders with Redoc CE. A version of the Redocly Museum API is displayed by default. To test it with your own OpenAPI description, enter the URL for your description and select Try it.
- HTML element: use this method to render API documentation for typical website deployments.
- Redocly CLI: Use the Redocly CLI
build-docsto generate an HTML page with your docs on your local machine. - React component: Use the React component to render API documentation in a React-based application.
- Docker image: Use the Docker image when you work in a container-based deployment.
To work with Redoc CE, make sure you have:
- an OpenAPI description file
- a utility that simulates an HTTP server
You need a JSON or YAML file that contains an OpenAPI description. For testing purposes, you can use one of the following sample OpenAPI description files:
- OpenAPI 3.0
- OpenAPI 2.0
For more information on the OpenAPI specification, see Learning OpenAPI 3.
To view your Redoc CE output locally, you can simulate an HTTP server.
To install an HTTP server with Python:
Python 3
cdinto your project directory.- run the following command:
python3 -m http.serverPython 2
cdinto your project directory.- run the following command:
python -m SimpleHTTPServer 8000The output provides a local URL where the preview can be accessed.
To exit the preview, press control+C.
To install http-server with Node.js:
- In your CLI, in your project directory, run the the following command:
npx http-server- After the installation completes, run:
http-serverThe output provides the local URL where you can access the preview.
To exit the preview, press control+C.
- Redoc CE quickstart guide - Start working with Redoc CE
- Learning OpenAPI 3 - Learn the OpenAPI 3.x specification
- Configure Redoc CE - See configuration options for Redoc CE 3.x