This tool was created to solve personal issues while working with Redocly and other API deployment tools. It converts an OpenAPI 3.0 YAML file to a static HTML file that can be hosted on a web server.
Python 3 should be installed for this to work.
- Clone the repository
git clone https://github.com/SiddharthBharadwaj/oapi2html.git
- Install the dependencies
cd oapi2html
pip3 install -r requirements.txt
- Run oapi2html
python oapi2html.py <input_file> <output_file>
where <input_file> is the path to the OpenAPI YAML file and <output_file> is the path to the HTML output file.
- Generates a modern and responsive HTML documentation page
- Supports Bootstrap and CSS styling
- Includes a search bar to easily find endpoints
- Displays detailed information for each endpoint, including parameters and responses
To see an example of the HTML output, you can view the scrrenshot below or the example_output.html file included in the repository.
Pull requests are welcome! Please open an issue first to discuss any changes you would like to make.